node-darwin-x64 24.8.0 → 25.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/CHANGELOG.md +177 -1642
  2. package/README.md +2 -2
  3. package/bin/node +0 -0
  4. package/include/node/common.gypi +1 -13
  5. package/include/node/config.gypi +12 -8
  6. package/include/node/cppgc/allocation.h +3 -3
  7. package/include/node/cppgc/cross-thread-persistent.h +25 -29
  8. package/include/node/cppgc/internal/finalizer-trait.h +1 -1
  9. package/include/node/cppgc/internal/gc-info.h +3 -3
  10. package/include/node/cppgc/internal/logging.h +2 -2
  11. package/include/node/cppgc/internal/name-trait.h +1 -1
  12. package/include/node/cppgc/internal/pointer-policies.h +3 -3
  13. package/include/node/cppgc/member.h +10 -4
  14. package/include/node/cppgc/persistent.h +14 -15
  15. package/include/node/cppgc/platform.h +1 -1
  16. package/include/node/cppgc/trace-trait.h +1 -2
  17. package/include/node/cppgc/visitor.h +14 -9
  18. package/include/node/js_native_api.h +21 -1
  19. package/include/node/node.h +34 -78
  20. package/include/node/node_version.h +3 -3
  21. package/include/node/openssl/archs/BSD-x86/asm/crypto/buildinf.h +1 -1
  22. package/include/node/openssl/archs/BSD-x86/asm/include/openssl/crypto.h +4 -4
  23. package/include/node/openssl/archs/BSD-x86/asm/include/openssl/opensslv.h +8 -13
  24. package/include/node/openssl/archs/BSD-x86/asm_avx2/crypto/buildinf.h +1 -1
  25. package/include/node/openssl/archs/BSD-x86/asm_avx2/include/openssl/crypto.h +4 -4
  26. package/include/node/openssl/archs/BSD-x86/asm_avx2/include/openssl/opensslv.h +8 -13
  27. package/include/node/openssl/archs/BSD-x86/no-asm/crypto/buildinf.h +1 -1
  28. package/include/node/openssl/archs/BSD-x86/no-asm/include/openssl/crypto.h +4 -4
  29. package/include/node/openssl/archs/BSD-x86/no-asm/include/openssl/opensslv.h +8 -13
  30. package/include/node/openssl/archs/BSD-x86_64/asm/crypto/buildinf.h +1 -1
  31. package/include/node/openssl/archs/BSD-x86_64/asm/include/openssl/crypto.h +4 -4
  32. package/include/node/openssl/archs/BSD-x86_64/asm/include/openssl/opensslv.h +8 -13
  33. package/include/node/openssl/archs/BSD-x86_64/asm_avx2/crypto/buildinf.h +1 -1
  34. package/include/node/openssl/archs/BSD-x86_64/asm_avx2/include/openssl/crypto.h +4 -4
  35. package/include/node/openssl/archs/BSD-x86_64/asm_avx2/include/openssl/opensslv.h +8 -13
  36. package/include/node/openssl/archs/BSD-x86_64/no-asm/crypto/buildinf.h +1 -1
  37. package/include/node/openssl/archs/BSD-x86_64/no-asm/include/openssl/crypto.h +4 -4
  38. package/include/node/openssl/archs/BSD-x86_64/no-asm/include/openssl/opensslv.h +8 -13
  39. package/include/node/openssl/archs/VC-WIN32/asm/crypto/buildinf.h +1 -1
  40. package/include/node/openssl/archs/VC-WIN32/asm/include/openssl/crypto.h +4 -4
  41. package/include/node/openssl/archs/VC-WIN32/asm/include/openssl/opensslv.h +8 -13
  42. package/include/node/openssl/archs/VC-WIN32/asm_avx2/crypto/buildinf.h +1 -1
  43. package/include/node/openssl/archs/VC-WIN32/asm_avx2/include/openssl/crypto.h +4 -4
  44. package/include/node/openssl/archs/VC-WIN32/asm_avx2/include/openssl/opensslv.h +8 -13
  45. package/include/node/openssl/archs/VC-WIN32/no-asm/crypto/buildinf.h +1 -1
  46. package/include/node/openssl/archs/VC-WIN32/no-asm/include/openssl/crypto.h +4 -4
  47. package/include/node/openssl/archs/VC-WIN32/no-asm/include/openssl/opensslv.h +8 -13
  48. package/include/node/openssl/archs/VC-WIN64-ARM/no-asm/crypto/buildinf.h +1 -1
  49. package/include/node/openssl/archs/VC-WIN64-ARM/no-asm/include/openssl/crypto.h +4 -4
  50. package/include/node/openssl/archs/VC-WIN64-ARM/no-asm/include/openssl/opensslv.h +8 -13
  51. package/include/node/openssl/archs/VC-WIN64A/asm/crypto/buildinf.h +1 -1
  52. package/include/node/openssl/archs/VC-WIN64A/asm/include/openssl/crypto.h +4 -4
  53. package/include/node/openssl/archs/VC-WIN64A/asm/include/openssl/opensslv.h +8 -13
  54. package/include/node/openssl/archs/VC-WIN64A/asm_avx2/crypto/buildinf.h +1 -1
  55. package/include/node/openssl/archs/VC-WIN64A/asm_avx2/include/openssl/crypto.h +4 -4
  56. package/include/node/openssl/archs/VC-WIN64A/asm_avx2/include/openssl/opensslv.h +8 -13
  57. package/include/node/openssl/archs/VC-WIN64A/no-asm/crypto/buildinf.h +1 -1
  58. package/include/node/openssl/archs/VC-WIN64A/no-asm/include/openssl/crypto.h +4 -4
  59. package/include/node/openssl/archs/VC-WIN64A/no-asm/include/openssl/opensslv.h +8 -13
  60. package/include/node/openssl/archs/aix64-gcc-as/asm/crypto/buildinf.h +1 -1
  61. package/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/crypto.h +4 -4
  62. package/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/opensslv.h +8 -13
  63. package/include/node/openssl/archs/aix64-gcc-as/asm_avx2/crypto/buildinf.h +1 -1
  64. package/include/node/openssl/archs/aix64-gcc-as/asm_avx2/include/openssl/crypto.h +4 -4
  65. package/include/node/openssl/archs/aix64-gcc-as/asm_avx2/include/openssl/opensslv.h +8 -13
  66. package/include/node/openssl/archs/aix64-gcc-as/no-asm/crypto/buildinf.h +1 -1
  67. package/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/crypto.h +4 -4
  68. package/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/opensslv.h +8 -13
  69. package/include/node/openssl/archs/darwin-i386-cc/asm/crypto/buildinf.h +1 -1
  70. package/include/node/openssl/archs/darwin-i386-cc/asm/include/openssl/crypto.h +4 -4
  71. package/include/node/openssl/archs/darwin-i386-cc/asm/include/openssl/opensslv.h +8 -13
  72. package/include/node/openssl/archs/darwin-i386-cc/asm_avx2/crypto/buildinf.h +1 -1
  73. package/include/node/openssl/archs/darwin-i386-cc/asm_avx2/include/openssl/crypto.h +4 -4
  74. package/include/node/openssl/archs/darwin-i386-cc/asm_avx2/include/openssl/opensslv.h +8 -13
  75. package/include/node/openssl/archs/darwin-i386-cc/no-asm/crypto/buildinf.h +1 -1
  76. package/include/node/openssl/archs/darwin-i386-cc/no-asm/include/openssl/crypto.h +4 -4
  77. package/include/node/openssl/archs/darwin-i386-cc/no-asm/include/openssl/opensslv.h +8 -13
  78. package/include/node/openssl/archs/darwin64-arm64-cc/asm/crypto/buildinf.h +1 -1
  79. package/include/node/openssl/archs/darwin64-arm64-cc/asm/include/openssl/crypto.h +4 -4
  80. package/include/node/openssl/archs/darwin64-arm64-cc/asm/include/openssl/opensslv.h +8 -13
  81. package/include/node/openssl/archs/darwin64-arm64-cc/asm_avx2/crypto/buildinf.h +1 -1
  82. package/include/node/openssl/archs/darwin64-arm64-cc/asm_avx2/include/openssl/crypto.h +4 -4
  83. package/include/node/openssl/archs/darwin64-arm64-cc/asm_avx2/include/openssl/opensslv.h +8 -13
  84. package/include/node/openssl/archs/darwin64-arm64-cc/no-asm/crypto/buildinf.h +1 -1
  85. package/include/node/openssl/archs/darwin64-arm64-cc/no-asm/include/openssl/crypto.h +4 -4
  86. package/include/node/openssl/archs/darwin64-arm64-cc/no-asm/include/openssl/opensslv.h +8 -13
  87. package/include/node/openssl/archs/darwin64-x86_64-cc/asm/crypto/buildinf.h +1 -1
  88. package/include/node/openssl/archs/darwin64-x86_64-cc/asm/include/openssl/crypto.h +4 -4
  89. package/include/node/openssl/archs/darwin64-x86_64-cc/asm/include/openssl/opensslv.h +8 -13
  90. package/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/crypto/buildinf.h +1 -1
  91. package/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/include/openssl/crypto.h +4 -4
  92. package/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/include/openssl/opensslv.h +8 -13
  93. package/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/crypto/buildinf.h +1 -1
  94. package/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/include/openssl/crypto.h +4 -4
  95. package/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/include/openssl/opensslv.h +8 -13
  96. package/include/node/openssl/archs/linux-aarch64/asm/crypto/buildinf.h +1 -1
  97. package/include/node/openssl/archs/linux-aarch64/asm/include/openssl/crypto.h +4 -4
  98. package/include/node/openssl/archs/linux-aarch64/asm/include/openssl/opensslv.h +8 -13
  99. package/include/node/openssl/archs/linux-aarch64/asm_avx2/crypto/buildinf.h +1 -1
  100. package/include/node/openssl/archs/linux-aarch64/asm_avx2/include/openssl/crypto.h +4 -4
  101. package/include/node/openssl/archs/linux-aarch64/asm_avx2/include/openssl/opensslv.h +8 -13
  102. package/include/node/openssl/archs/linux-aarch64/no-asm/crypto/buildinf.h +1 -1
  103. package/include/node/openssl/archs/linux-aarch64/no-asm/include/openssl/crypto.h +4 -4
  104. package/include/node/openssl/archs/linux-aarch64/no-asm/include/openssl/opensslv.h +8 -13
  105. package/include/node/openssl/archs/linux-armv4/asm/crypto/buildinf.h +1 -1
  106. package/include/node/openssl/archs/linux-armv4/asm/include/openssl/crypto.h +4 -4
  107. package/include/node/openssl/archs/linux-armv4/asm/include/openssl/opensslv.h +8 -13
  108. package/include/node/openssl/archs/linux-armv4/asm_avx2/crypto/buildinf.h +1 -1
  109. package/include/node/openssl/archs/linux-armv4/asm_avx2/include/openssl/crypto.h +4 -4
  110. package/include/node/openssl/archs/linux-armv4/asm_avx2/include/openssl/opensslv.h +8 -13
  111. package/include/node/openssl/archs/linux-armv4/no-asm/crypto/buildinf.h +1 -1
  112. package/include/node/openssl/archs/linux-armv4/no-asm/include/openssl/crypto.h +4 -4
  113. package/include/node/openssl/archs/linux-armv4/no-asm/include/openssl/opensslv.h +8 -13
  114. package/include/node/openssl/archs/linux-elf/asm/crypto/buildinf.h +1 -1
  115. package/include/node/openssl/archs/linux-elf/asm/include/openssl/crypto.h +4 -4
  116. package/include/node/openssl/archs/linux-elf/asm/include/openssl/opensslv.h +8 -13
  117. package/include/node/openssl/archs/linux-elf/asm_avx2/crypto/buildinf.h +1 -1
  118. package/include/node/openssl/archs/linux-elf/asm_avx2/include/openssl/crypto.h +4 -4
  119. package/include/node/openssl/archs/linux-elf/asm_avx2/include/openssl/opensslv.h +8 -13
  120. package/include/node/openssl/archs/linux-elf/no-asm/crypto/buildinf.h +1 -1
  121. package/include/node/openssl/archs/linux-elf/no-asm/include/openssl/crypto.h +4 -4
  122. package/include/node/openssl/archs/linux-elf/no-asm/include/openssl/opensslv.h +8 -13
  123. package/include/node/openssl/archs/linux-ppc64le/asm/crypto/buildinf.h +1 -1
  124. package/include/node/openssl/archs/linux-ppc64le/asm/include/openssl/crypto.h +4 -4
  125. package/include/node/openssl/archs/linux-ppc64le/asm/include/openssl/opensslv.h +8 -13
  126. package/include/node/openssl/archs/linux-ppc64le/asm_avx2/crypto/buildinf.h +1 -1
  127. package/include/node/openssl/archs/linux-ppc64le/asm_avx2/include/openssl/crypto.h +4 -4
  128. package/include/node/openssl/archs/linux-ppc64le/asm_avx2/include/openssl/opensslv.h +8 -13
  129. package/include/node/openssl/archs/linux-ppc64le/no-asm/crypto/buildinf.h +1 -1
  130. package/include/node/openssl/archs/linux-ppc64le/no-asm/include/openssl/crypto.h +4 -4
  131. package/include/node/openssl/archs/linux-ppc64le/no-asm/include/openssl/opensslv.h +8 -13
  132. package/include/node/openssl/archs/linux-x86_64/asm/crypto/buildinf.h +1 -1
  133. package/include/node/openssl/archs/linux-x86_64/asm/include/openssl/crypto.h +4 -4
  134. package/include/node/openssl/archs/linux-x86_64/asm/include/openssl/opensslv.h +8 -13
  135. package/include/node/openssl/archs/linux-x86_64/asm_avx2/crypto/buildinf.h +1 -1
  136. package/include/node/openssl/archs/linux-x86_64/asm_avx2/include/openssl/crypto.h +4 -4
  137. package/include/node/openssl/archs/linux-x86_64/asm_avx2/include/openssl/opensslv.h +8 -13
  138. package/include/node/openssl/archs/linux-x86_64/no-asm/crypto/buildinf.h +1 -1
  139. package/include/node/openssl/archs/linux-x86_64/no-asm/include/openssl/crypto.h +4 -4
  140. package/include/node/openssl/archs/linux-x86_64/no-asm/include/openssl/opensslv.h +8 -13
  141. package/include/node/openssl/archs/linux32-s390x/asm/crypto/buildinf.h +1 -1
  142. package/include/node/openssl/archs/linux32-s390x/asm/include/openssl/crypto.h +4 -4
  143. package/include/node/openssl/archs/linux32-s390x/asm/include/openssl/opensslv.h +8 -13
  144. package/include/node/openssl/archs/linux32-s390x/asm_avx2/crypto/buildinf.h +1 -1
  145. package/include/node/openssl/archs/linux32-s390x/asm_avx2/include/openssl/crypto.h +4 -4
  146. package/include/node/openssl/archs/linux32-s390x/asm_avx2/include/openssl/opensslv.h +8 -13
  147. package/include/node/openssl/archs/linux32-s390x/no-asm/crypto/buildinf.h +1 -1
  148. package/include/node/openssl/archs/linux32-s390x/no-asm/include/openssl/crypto.h +4 -4
  149. package/include/node/openssl/archs/linux32-s390x/no-asm/include/openssl/opensslv.h +8 -13
  150. package/include/node/openssl/archs/linux64-loongarch64/no-asm/crypto/buildinf.h +1 -1
  151. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/crypto.h +4 -4
  152. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/opensslv.h +8 -13
  153. package/include/node/openssl/archs/linux64-mips64/asm/crypto/buildinf.h +1 -1
  154. package/include/node/openssl/archs/linux64-mips64/asm/include/openssl/crypto.h +4 -4
  155. package/include/node/openssl/archs/linux64-mips64/asm/include/openssl/opensslv.h +8 -13
  156. package/include/node/openssl/archs/linux64-mips64/asm_avx2/crypto/buildinf.h +1 -1
  157. package/include/node/openssl/archs/linux64-mips64/asm_avx2/include/openssl/crypto.h +4 -4
  158. package/include/node/openssl/archs/linux64-mips64/asm_avx2/include/openssl/opensslv.h +8 -13
  159. package/include/node/openssl/archs/linux64-mips64/no-asm/crypto/buildinf.h +1 -1
  160. package/include/node/openssl/archs/linux64-mips64/no-asm/include/openssl/crypto.h +4 -4
  161. package/include/node/openssl/archs/linux64-mips64/no-asm/include/openssl/opensslv.h +8 -13
  162. package/include/node/openssl/archs/linux64-riscv64/no-asm/crypto/buildinf.h +1 -1
  163. package/include/node/openssl/archs/linux64-riscv64/no-asm/include/openssl/crypto.h +4 -4
  164. package/include/node/openssl/archs/linux64-riscv64/no-asm/include/openssl/opensslv.h +8 -13
  165. package/include/node/openssl/archs/linux64-s390x/asm/crypto/buildinf.h +1 -1
  166. package/include/node/openssl/archs/linux64-s390x/asm/include/openssl/crypto.h +4 -4
  167. package/include/node/openssl/archs/linux64-s390x/asm/include/openssl/opensslv.h +8 -13
  168. package/include/node/openssl/archs/linux64-s390x/asm_avx2/crypto/buildinf.h +1 -1
  169. package/include/node/openssl/archs/linux64-s390x/asm_avx2/include/openssl/crypto.h +4 -4
  170. package/include/node/openssl/archs/linux64-s390x/asm_avx2/include/openssl/opensslv.h +8 -13
  171. package/include/node/openssl/archs/linux64-s390x/no-asm/crypto/buildinf.h +1 -1
  172. package/include/node/openssl/archs/linux64-s390x/no-asm/include/openssl/crypto.h +4 -4
  173. package/include/node/openssl/archs/linux64-s390x/no-asm/include/openssl/opensslv.h +8 -13
  174. package/include/node/openssl/archs/solaris-x86-gcc/asm/crypto/buildinf.h +1 -1
  175. package/include/node/openssl/archs/solaris-x86-gcc/asm/include/openssl/crypto.h +4 -4
  176. package/include/node/openssl/archs/solaris-x86-gcc/asm/include/openssl/opensslv.h +8 -13
  177. package/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/crypto/buildinf.h +1 -1
  178. package/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/include/openssl/crypto.h +4 -4
  179. package/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/include/openssl/opensslv.h +8 -13
  180. package/include/node/openssl/archs/solaris-x86-gcc/no-asm/crypto/buildinf.h +1 -1
  181. package/include/node/openssl/archs/solaris-x86-gcc/no-asm/include/openssl/crypto.h +4 -4
  182. package/include/node/openssl/archs/solaris-x86-gcc/no-asm/include/openssl/opensslv.h +8 -13
  183. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm/crypto/buildinf.h +1 -1
  184. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm/include/openssl/crypto.h +4 -4
  185. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm/include/openssl/opensslv.h +8 -13
  186. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/crypto/buildinf.h +1 -1
  187. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/include/openssl/crypto.h +4 -4
  188. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/include/openssl/opensslv.h +8 -13
  189. package/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/crypto/buildinf.h +1 -1
  190. package/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/include/openssl/crypto.h +4 -4
  191. package/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/include/openssl/opensslv.h +8 -13
  192. package/include/node/openssl/proverr.h +1 -0
  193. package/include/node/openssl/self_test.h +1 -0
  194. package/include/node/v8-array-buffer.h +1 -1
  195. package/include/node/v8-callbacks.h +3 -4
  196. package/include/node/v8-context.h +15 -5
  197. package/include/node/v8-data.h +5 -0
  198. package/include/node/v8-debug.h +11 -0
  199. package/include/node/v8-function-callback.h +26 -26
  200. package/include/node/v8-internal.h +136 -36
  201. package/include/node/v8-isolate.h +75 -16
  202. package/include/node/v8-json.h +8 -1
  203. package/include/node/v8-local-handle.h +112 -13
  204. package/include/node/v8-maybe.h +34 -10
  205. package/include/node/v8-memory-span.h +9 -4
  206. package/include/node/v8-message.h +3 -0
  207. package/include/node/v8-object.h +87 -24
  208. package/include/node/v8-persistent-handle.h +4 -4
  209. package/include/node/v8-platform.h +92 -28
  210. package/include/node/v8-primitive.h +22 -9
  211. package/include/node/v8-profiler.h +4 -0
  212. package/include/node/v8-sandbox.h +16 -0
  213. package/include/node/v8-source-location.h +19 -26
  214. package/include/node/v8-template.h +37 -15
  215. package/include/node/v8-traced-handle.h +6 -6
  216. package/include/node/v8-unwinder.h +13 -0
  217. package/include/node/v8-version.h +4 -4
  218. package/include/node/v8config.h +65 -5
  219. package/package.json +5 -1
  220. package/share/doc/node/gdbinit +221 -4
  221. package/share/man/man1/node.1 +21 -4
@@ -14,6 +14,8 @@ end
14
14
  # Print content of V8 handles.
15
15
  python
16
16
  import gdb
17
+ import gdb.printing
18
+ import gdb.types
17
19
 
18
20
  class PrintV8HandleCommand(gdb.Command):
19
21
  """Print content of a V8 object, accessed through a handle."""
@@ -94,9 +96,25 @@ PrintV8LocalCommand()
94
96
  PrintV8InternalHandleCommand()
95
97
  end
96
98
 
97
- alias jlh = print-v8-local
98
- alias jl = print-v8-local
99
- alias jh = print-v8-internal-handle
99
+ python
100
+ class TryAliasCommand(gdb.Command):
101
+ """Create an alias, but don't error if it already exists."""
102
+
103
+ def __init__ (self):
104
+ super (TryAliasCommand, self).__init__ ("try-alias", gdb.COMMAND_FILES)
105
+
106
+ def invoke (self, arg, from_tty):
107
+ try:
108
+ gdb.execute('alias ' + arg)
109
+ except:
110
+ pass
111
+
112
+ TryAliasCommand()
113
+ end
114
+
115
+ try-alias jlh = print-v8-local
116
+ try-alias jl = print-v8-local
117
+ try-alias jh = print-v8-internal-handle
100
118
 
101
119
  # Print Code objects containing given PC.
102
120
  define jco
@@ -361,7 +379,7 @@ import subprocess
361
379
  import sys
362
380
 
363
381
  compile_dirs = set()
364
-
382
+ src_dir = None
365
383
 
366
384
  def get_current_debug_file_directories():
367
385
  dir = gdb.execute("show debug-file-directory", to_string=True)
@@ -380,6 +398,40 @@ def add_debug_file_directory(dir):
380
398
  "set debug-file-directory %s" % ":".join(current_dirs), to_string=True)
381
399
 
382
400
 
401
+ def load_libcxx_pretty_printers(src_dir):
402
+ libcxx_pretty_printers = os.path.join(src_dir, 'third_party', 'libc++', 'src',
403
+ 'utils', 'gdb', 'libcxx')
404
+ if not os.path.isdir(libcxx_pretty_printers):
405
+ return
406
+ sys.path.insert(1, libcxx_pretty_printers)
407
+ from printers import register_libcxx_printer_loader
408
+ register_libcxx_printer_loader()
409
+
410
+
411
+ def set_src_dir(compile_dir):
412
+ global src_dir
413
+ git = subprocess.Popen(
414
+ ['git', '-C', compile_dir, 'rev-parse', '--show-toplevel'],
415
+ stdout=subprocess.PIPE,
416
+ stderr=subprocess.PIPE)
417
+ src_dir, _ = git.communicate()
418
+ if git.returncode:
419
+ return
420
+ if isinstance(src_dir, str):
421
+ src_dir = src_dir.rstrip()
422
+ else:
423
+ src_dir = src_dir.decode('utf-8').rstrip()
424
+
425
+ # If there's no LICENSE.v8 file in the repo root, we got the wrong git repo.
426
+ # The most common way to have this happen is to be in a git checkout of
427
+ # another project that vendors chromium in its own third_party directory. In
428
+ # that case, try falling back to the current working directory.
429
+ if not os.path.isfile(os.path.join(src_dir, 'LICENSE.v8')):
430
+ src_dir = os.path.abspath(os.getcwd())
431
+
432
+ load_libcxx_pretty_printers(src_dir)
433
+
434
+
383
435
  def newobj_handler(event):
384
436
  global compile_dirs
385
437
  compile_dir = os.path.dirname(event.new_objfile.filename)
@@ -396,6 +448,10 @@ def newobj_handler(event):
396
448
  # https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html
397
449
  # https://crbug.com/603286#c35
398
450
  add_debug_file_directory(compile_dir)
451
+
452
+ global src_dir
453
+ if not src_dir:
454
+ set_src_dir(compile_dir)
399
455
 
400
456
  # Event hook for newly loaded objfiles.
401
457
  # https://sourceware.org/gdb/onlinedocs/gdb/Events-In-Python.html
@@ -455,6 +511,7 @@ def cppgc_pretty_printers(val):
455
511
 
456
512
 
457
513
  gdb.pretty_printers.append(cppgc_pretty_printers)
514
+
458
515
  class TaggedPrintCommand(gdb.Command):
459
516
  """
460
517
  The equivalent of the print command that deals with tagged objects
@@ -515,4 +572,164 @@ class TaggedPrintCommand(gdb.Command):
515
572
 
516
573
  TaggedPrintCommand()
517
574
 
575
+
576
+ static_roots_cache = None
577
+ def GetStaticRoot(ptr):
578
+ global static_roots_cache
579
+ if static_roots_cache is None:
580
+ static_roots_cache = {}
581
+ try:
582
+ for field in gdb.lookup_type("v8::internal::StaticReadOnlyRoot").fields():
583
+ value = gdb.parse_and_eval("v8::internal::StaticReadOnlyRoot::"+field.name)
584
+ if int(value) in static_roots_cache:
585
+ static_roots_cache[int(value)] += "," + field.name
586
+ else:
587
+ static_roots_cache[int(value)] = field.name
588
+ except Exception as e:
589
+ print("Warning, couldn't find static roots: ", e)
590
+ ptr = ptr & 0xFFFFFFFF
591
+ return static_roots_cache.get(ptr, None)
592
+
593
+
594
+ def InterpretTaggedPointer(pointer):
595
+ if (pointer & 0x1) == 0:
596
+ return f"Smi: {pointer >> 1}"
597
+
598
+ static_root = GetStaticRoot(pointer)
599
+ if static_root is not None:
600
+ return f"{static_root}"
601
+
602
+ return None
603
+
604
+
605
+ def OptimizedOutToNone(val):
606
+ if val is None:
607
+ return None
608
+ if val.is_optimized_out:
609
+ return None
610
+ return val
611
+
612
+
613
+ class TaggedPrinter(object):
614
+ """Print Tagged<Foo> types."""
615
+
616
+ def __init__(self, val, pointee_type):
617
+ self.val = OptimizedOutToNone(val)
618
+ self.pointee_type = pointee_type.lstrip('v8::internal::')
619
+ self.ptr = self.val["ptr_"] if self.val is not None else None
620
+
621
+ def to_string(self):
622
+ if self.ptr is None:
623
+ return f"Tagged<{self.pointee_type}>{{<optimized out>}}"
624
+ pointer = int(self.ptr)
625
+ fmt = f"Tagged<{self.pointee_type}>{{0x{pointer:02x}}}"
626
+ if (label := InterpretTaggedPointer(pointer)) is not None:
627
+ fmt += f" ({label})"
628
+ return fmt
629
+
630
+
631
+ def tagged_pretty_printers(val):
632
+ # The member type might have been obscured by typedefs and template
633
+ # arguments. Fallback to using the underlying type.
634
+ real_type = val.type.strip_typedefs()
635
+ typename = real_type.name or real_type.tag or str(real_type)
636
+ regex = re.compile("^v8::internal::Tagged<(.*)>$")
637
+ match = regex.match(typename)
638
+ if match is not None:
639
+ return TaggedPrinter(val, pointee_type=match.group(1))
640
+
641
+ return None
642
+
643
+
644
+ gdb.pretty_printers.append(tagged_pretty_printers)
645
+
646
+
647
+ class HandlePrinter(object):
648
+ """Print Handle<Foo> types."""
649
+
650
+ def __init__(self, val, pointee_type):
651
+ self.val = OptimizedOutToNone(val)
652
+ self.pointee_type = pointee_type.lstrip('v8::internal::')
653
+ self.location = OptimizedOutToNone(self.val["location_"] if self.val is not None else None)
654
+ self.ptr = self.location.dereference() if self.location is not None else None
655
+
656
+ def to_string(self):
657
+ if self.location is None:
658
+ return f"Handle<{self.pointee_type}>{{<optimized out>}}"
659
+ location = int(self.location)
660
+ fmt = f"Handle<{self.pointee_type}>{{0x{location:02x}}}: "
661
+ if self.ptr is None:
662
+ fmt += f"<optimized out>"
663
+ else:
664
+ pointer = None
665
+ try:
666
+ pointer = int(self.ptr)
667
+ except Exception as e:
668
+ fmt += f"[{e}]"
669
+ else:
670
+ fmt += f"0x{pointer:02x}"
671
+ if (label := InterpretTaggedPointer(pointer)) is not None:
672
+ fmt += f" ({label})"
673
+
674
+ return fmt
675
+
676
+
677
+ def handle_pretty_printers(val):
678
+ # The member type might have been obscured by typedefs and template
679
+ # arguments. Fallback to using the underlying type.
680
+ real_type = val.type.strip_typedefs()
681
+ typename = real_type.name or real_type.tag or str(real_type)
682
+ regex = re.compile("^v8::internal::(?:Indirect)?Handle<(.*)>$")
683
+ match = regex.match(typename)
684
+ if match is not None:
685
+ return HandlePrinter(val, pointee_type=match.group(1))
686
+
687
+ return None
688
+
689
+
690
+ gdb.pretty_printers.append(handle_pretty_printers)
691
+
692
+
693
+ class DirectHandlePrinter(object):
694
+ """Print DirectHandle<Foo> types."""
695
+
696
+ def __init__(self, val, pointee_type):
697
+ self.val = val
698
+ self.pointee_type = pointee_type.lstrip('v8::internal::')
699
+ self.inner = None
700
+ if gdb.types.has_field(self.val.type, "handle_"):
701
+ self.inner = HandlePrinter(val['handle_'], pointee_type)
702
+ elif gdb.types.has_field(self.val.type, "obj_"):
703
+ self.inner = TaggedPrinter(val['obj_'], pointee_type)
704
+ else:
705
+ print("Warning: No recognised DirectHandle field")
706
+
707
+ def to_string(self):
708
+ if self.inner is not None:
709
+ return self.inner.to_string()
710
+
711
+
712
+ def direct_handle_pretty_printers(val):
713
+ # The member type might have been obscured by typedefs and template
714
+ # arguments. Fallback to using the underlying type.
715
+ real_type = val.type.strip_typedefs()
716
+ typename = real_type.name or real_type.tag or str(real_type)
717
+ regex = re.compile("^v8::internal::DirectHandle<(.*)>$")
718
+ match = regex.match(typename)
719
+ if match is not None:
720
+ if gdb.types.has_field(real_type, "handle_"):
721
+ handle = None
722
+ if not val.is_optimized_out:
723
+ handle = val['handle_']
724
+ return HandlePrinter(handle, match.group(1))
725
+ elif gdb.types.has_field(real_type, "obj_"):
726
+ obj = None
727
+ if not val.is_optimized_out:
728
+ obj = val['obj_']
729
+ return TaggedPrinter(obj, match.group(1))
730
+
731
+ return None
732
+
733
+ gdb.pretty_printers.append(direct_handle_pretty_printers)
734
+
518
735
  end
@@ -85,6 +85,12 @@ Allow using native addons when using the permission model.
85
85
  .It Fl -allow-child-process
86
86
  Allow spawning process when using the permission model.
87
87
  .
88
+ .It Fl -allow-inspector
89
+ Allow inspector access when using the permission model.
90
+ .
91
+ .It Fl -allow-net
92
+ Allow network access when using the permission model.
93
+ .
88
94
  .It Fl -allow-wasi
89
95
  Allow execution of WASI when using the permission model.
90
96
  .
@@ -201,8 +207,8 @@ Enable experimental support for the EventSource Web API.
201
207
  .It Fl -no-experimental-websocket
202
208
  Disable experimental support for the WebSocket API.
203
209
  .
204
- .It Fl -experimental-webstorage
205
- Enable experimental support for the Web Storage API.
210
+ .It Fl -no-webstorage
211
+ Disable webstorage.
206
212
  .
207
213
  .It Fl -no-experimental-repl-await
208
214
  Disable top-level await keyword support in REPL.
@@ -333,7 +339,7 @@ The file used to store localStorage data.
333
339
  Specify the maximum size of HTTP headers in bytes. Defaults to 16 KiB.
334
340
  .
335
341
  .It Fl -max-old-space-size-percentage Ns = Ns Ar percentage
336
- Sets the max memory size of V8's old memory section as a percentage of available system memory.
342
+ Sets the maximum memory size of V8's old memory section as a percentage of available system memory.
337
343
  This flag takes precedence over
338
344
  .Fl -max-old-space-size
339
345
  when both are specified.
@@ -341,6 +347,10 @@ The
341
347
  .Ar percentage
342
348
  parameter must be a number greater than 0 and up to 100, representing the percentage
343
349
  of available system memory to allocate to the V8 heap.
350
+ .Pp
351
+ Note: This flag utilizes
352
+ .Fl -max-old-space-size ,
353
+ which may be unreliable on 32-bit platforms due to integer overflow issues.
344
354
  .
345
355
  .It Fl -napi-modules
346
356
  This option is a no-op.
@@ -656,7 +666,7 @@ This will turn off watching of required or imported modules, even when used in c
656
666
  Customizes the signal sent to the process on watch mode restarts.
657
667
  .
658
668
  .It Fl -zero-fill-buffers
659
- Automatically zero-fills all newly allocated Buffer and SlowBuffer instances.
669
+ Automatically zero-fills all newly allocated Buffer instances.
660
670
  .
661
671
  .It Fl c , Fl -check
662
672
  Check the script's syntax without executing it.
@@ -719,6 +729,13 @@ Enable the
719
729
  .Sy module compile cache
720
730
  for the Node.js instance.
721
731
  .
732
+ .It Ev NODE_COMPILE_CACHE_PORTABLE
733
+ When set to '1' or 'true', the
734
+ .Sy module compile cache
735
+ will be hit as long as the location of the modules relative to the cache directory remain
736
+ consistent. This can be used in conjunction with .Ev NODE_COMPILE_CACHE
737
+ to enable portable on-disk caching.
738
+ .
722
739
  .It Ev NODE_DEBUG Ar modules...
723
740
  Comma-separated list of core modules that should print debug information.
724
741
  .