Skip to content

Conversation

@joyeecheung
Copy link
Member

Build it with gdbjit support on supported platforms by default allows debugging JIT-compiled code in gdb when it's also enabled at run time (via --gdbjit). Simply building it in should not incur an overhead if it's not also enabled at run time.

Build it with gdbjit support on supported platforms by default
allows debugging JIT-compiled code in gdb when it's also enabled
at run time (via --gdbjit). Simply building it in should not
incur an overhead if it's not also enabled at run time.
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. labels Dec 9, 2025
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 10, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 10, 2025
@nodejs-github-bot
Copy link
Collaborator

@joyeecheung
Copy link
Member Author

joyeecheung commented Dec 10, 2025

FWIW I think V8 gdbjit is currently broken - I tested both the release and debug builds, and with --gdbjit-full

$ echo "throw new Error" >> throw.js
$ gdb --args out/Debug/node --gdbjit --abort-on-uncaught-exception throw.js
(gdb) run
(gdb) bt
#0  operator() (__closure=<optimized out>) at ../../deps/v8/src/base/platform/platform-posix.cc:801
#1  v8::base::OS::Abort () at ../../deps/v8/src/base/platform/platform-posix.cc:801
#2  0x0000555556ed1251 in v8::internal::Isolate::CreateMessageOrAbort (this=this@entry=0x55555eb38000, exception=..., exception@entry=..., location=location@entry=0x7fffffffd080)
    at ../../deps/v8/src/execution/isolate.cc:2151
#3  0x0000555556ed17f0 in v8::internal::Isolate::Throw (this=this@entry=0x55555eb38000, raw_exception=..., location=<optimized out>, location@entry=0x0) at ../../deps/v8/src/execution/isolate.cc:2250
#4  0x000055555789f921 in v8::internal::__RT_impl_Runtime_Throw (isolate=0x55555eb38000, args=...) at ../../deps/v8/src/runtime/runtime-internal.cc:63
#5  v8::internal::Runtime_Throw (args_length=<optimized out>, args_object=0x7fffffffd148, isolate=0x55555eb38000) at ../../deps/v8/src/runtime/runtime-internal.cc:60
#6  0x00007fffd7e16a36 in ?? ()
#7  0x00000bc71f7dd791 in ?? ()
#8  0x00007fffffffd120 in ?? ()
#9  0x0000000000000006 in ?? ()
#10 0x00007fffffffd168 in ?? ()
#11 0x00007fffd7f7c1b7 in ?? ()
#12 0x000001cd76d63641 in ?? ()
#13 0x000000000000037e in ?? ()
#14 0x00007fffffffd268 in ?? ()
#15 0x0000000000000026 in ?? ()
#16 0x00007fffffffd268 in ?? ()
#17 0x00007fffd7d51513 in ?? ()
--Type <RET> for more, q to quit, c to continue without paging--

It's also broken when I tried to test it in upstream d8, though with --gdbjit-full it could at least show trampoline frames and not show bogus frames/corrupted stack, but still it cannot symbolicate properly. Trying to force it into Turbofan didn't make any difference either.

@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants