I\'m trying to debug a deadlock in a multi-threaded Python application after it has locked up. Is there a way to attach a debugger to inspect the state of the process?
Yeah, gdb is good for lower level debugging.
You can change threads with the thread command.
e.g
(gdb) thr 2 [Switching to thread 2 (process 6159 thread 0x3f1b)] (gdb) backtrace ....
You could also check out Python specific debuggers like Winpdb, or pydb. Both platform independent.