[Libreoffice] gdb: info mutex

Tom Tromey tromey at redhat.com
Tue Oct 18 07:07:15 PDT 2011

>>>>> "Michael" == Michael Stahl <mstahl-H+wXaHxf7aLQT0dZR+AlfA at public.gmane.org> writes:

Michael> have just found a great python command for GDB by Tom Tromey called
Michael> "info mutex":
Michael> http://www.cygwin.com/ml/archer/2010-q3/msg00024.html
Michael> looks very helpful for debugging a deadlock:

Just be warned, it is a bit broken.  It has some heuristics to see when
a thread is attempting to acquire a lock, but these do not always yield
the correct answer.  Still, it shouldn't be too misleading, as you can
always dig around manually to verify what it says.

Also I think you need glibc debuginfo installed for it to work at all.

We hope to write a better version, replacing the heuristics with hidden
breakpoints on sdt.h probe points in glibc.  I think the probes might be
there (in Fedora, but probably not anywhere else, as upstream rejected
the probes), but we haven't written the gdb side yet.


More information about the LibreOffice mailing list