GDB & LLDB plugins for v8 via debug_helper

63 views
Skip to first unread message

Joyee Cheung

unread,
Apr 20, 2026, 9:41:17 AMApr 20
to v8-dev...@googlegroups.com
Hi folks,

I have written a design doc on implementing GDB and LLDB plugins using the debug_helper, so that we can surface more JavaScript states when debugging system core dumps. This would complement the existing Windbg integration that also builds on top of debug_helper.

The initial implementation focuses on annotating JS frames in back traces with JS source information.


Feedback welcomed!

Regards,
Joyee

Olivier Flückiger

unread,
Apr 21, 2026, 7:02:01 AMApr 21
to v8-...@googlegroups.com
Hi Joyee,

Incidentally I have just started working on fixing various issues and extending --gdbjit. I think a large part of what you are describing is already available behind this flag. As of yesterday it should work again with optimized code and it even shows maglev IR (see --maglev-gdbjit). I am also working on fixing the startup penalty it has, so we might be able to enable it by default on debug builds.

*oli


--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/v8-dev/ECAA6D72-F8BA-446E-9B10-88D5C0E62207%40igalia.com.

Joyee Cheung

unread,
Apr 21, 2026, 9:17:03 AMApr 21
to v8-...@googlegroups.com
Hi Olivier,

Thanks, that’s good news to hear. I tried a while back in enabling --gdbjit in Node.js and I think the use cases for the plugins proposed are slightly different from --gdbjit: as far as I know GDB JIT integration has runtime overhead from the additional wiring during code compilation and so needs to be enabled when the application launches. debug_helper on the other hand would also be useful for post-mortem debugging - i.e. debugging crash dumps collected when a release build crashes in a remote environment under usual runtime configuration in V8. The crash dump is essentially just a copy of live memory at the point of the crash and can be configured e.g. at the system level, so it has no runtime overhead and helps navigating sporadic crashes difficult to reproduce locally. Operating on a more complete dump of the process can also make it easier to e.g. investigate memory leaks or corruptions.

Although I think some of the internal machinery maybe shared to make debuggability (no matter live or post-mortem) in general easier to maintain :)

Leszek Swirski

unread,
Apr 22, 2026, 5:15:58 AMApr 22
to v8-...@googlegroups.com
Hi Joyee,

I think your usecase makes sense, and I think it makes sense for us to take everything that we can get when it comes to improving the debug experience -- I see the work Oli is doing and what you are proposing as complementary, and potentially able to mutually strengthen each other. As I commented on the doc, the only major concern I have with a plugin is making sure that it stays functional when state is corrupted, so that we can always rely on the debugger working when debugging something that is going wrong. Otherwise, big LGTM from my point of view to improve the debugging experience.

- Leszek

Joyee Cheung

unread,
Apr 22, 2026, 10:48:50 AMApr 22
to v8-...@googlegroups.com
Hi Leszek,

Thanks for the feedback, yes I agree they are complementary - with gdbjit integration there can be more powerful features (e.g. theoretically it may be possible to step through JS-source if sufficient information is provided? That would be quite cool) at the cost of some overhead. debug_helper plugins would provide less information but it helps with cases that can't be reproduced in a setup with gdbjit enabled, and maybe we could implement the coredump-to-heapsnapshot idea that was envisioned in the earlier design of debug_helper. And then there might be cases where GDB has a bug in the paths used by one but not the other, so it’s nice to have a solution that exercises different paths.

Regards,
Joyee

Reply all
Reply to author
Forward
0 new messages