Proposal: add more debugging symbols related to Node internal structures #46
Description
Hello everyone!
I'm writing a command to llnode to print all Handles and Requests on the queue of a core dump (similar to what node::GetActiveHandles and node::GetActiveRequests do). While I was working I noticed that, although there's plenty of debugging symbols to help navigate V8 structures (v8dbg_
symbols, thanks to the postmortem-metadata
action on V8 build), there are no symbols to describe Node internal structures.
Using as example the command I'm implementing, I need to get the current Environment
, navigate to the corresponding queue (let's say, handle_wrap_queue_
), and then iterate over this queue (which was created with ListHead
) to be able to get the HandleWrap objects. All of this can be done easily on a node debug build, but it's not possible to do on a common build.
I thought about implementing something similar to V8 postmortem-metadata: a script that creates a .cc
file with all wanted symbols prefixed with something like nodedbg_
. Would that be acceptable? I could probably publish a draft patch at the end of this week. I think this would be useful for other debugging tools, not just llnode.
I'm opened to suggestions.
In the meantime, thank you so much for your attention and participation.