|
Getting a handle in GDB on the main WT instance inside of a mongod coredump/process is a bit of a pain. It requires identifying and navigating to a thread + frame with an appropriate local, non-optimized out variable. We should be able to add a better experience to search for this data, in a similar vein to getting the ServiceContext.
However I think we should offer two APIs:
- One just prints out the address in a gdb pasteable bit. E.g:
(WT_CONNECTION_IMPL*)0xdeadbeef
|
- Another can be used by other gdb scripts that want to walk datastructures starting from the connection. This would return a gdb.Value type (I think that's the right one?)
I suspect this might require the gdb helper to switch threads/frames. It'd be nice to put gdb back to the thread/frame it was at.
|