Dumping lock manager will show idle transactions that are holding locks. It will be very helpful to also dump the sessions and their transaction participants to show the logical session id and transaction number that is holding the resources.
SERVER-37406 will keep that information in the locker. However, dumping the session catalog is able to print more information, like buffered transaction operations and has no performance impact on production system.
One solution is to implement a global function in C++ to dump session catalog. The concern is that it only works on live process and not on core dump. It runs on a live process so that other threads can also run to change the state as mentioned in
SERVER-28437. A better but harder solution is to examine the memory using GDB scripting, which avoids all those problems.