This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
v8dbg_* symbols not available when NodeJS is statically linked with V8 #4274
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When NodeJS is statically linked with libv8_base.a, which is the default, I've found that the v8dbg_* debug symbols generated by
deps/v8/tools/gen-postmortem-metadata.py
are not included in the node binaries. This makes debugging with GDB or writing DTrace or SystemTap probes more difficult than needed (seetools/genv8constants.py
).After some hunting around, I found that while debug-support.cc is being generated and compiled, the
debug-support.o
object file is never linked into the node binaries. This is because the linker decides that nothing in the node binary actually uses anything defined indebug-support.o
, and skips the object file entirely.I've found a surprisingly trivial fix: instead of a C++ file, create a header file instead, then #include it somewhere which is certainly going to get linked into node.
Any comments and suggestions are very welcome.
Tested with gdb and SystemTap