Re: [HACKERS] Getting list of held lwlocks from debugger

2014-07-15 Thread Tom Lane
Jeff Janes writes: > Is there an easy way to get a list of held lwlocks out of gdb attached to a > core dump (or for that matter attached to a live process)? There's the held_lwlocks array in lwlock.c, but that will just give you pointers. What I imagine you're wishing for is some symbolic displ

[HACKERS] Getting list of held lwlocks from debugger

2014-07-14 Thread Jeff Janes
Is there an easy way to get a list of held lwlocks out of gdb attached to a core dump (or for that matter attached to a live process)? I can try manually walking the internal data structure, but I am hoping for something analogous to the way you get memory contexts: (gdb) p MemoryContextStats(Top