Using gdb on a multithreaded process

Phillip Susi psusi at cfl.rr.com
Fri Jan 13 22:04:00 GMT 2006


According do the gdb documentation, it stops all threads in a 
multithreaded process whenever it stops one.  I have been trying to use 
gdb to debug a segfault in 7zip only it appears that the process 
terminates out from under gdb.  Once gdb notes that the process got a 
segv, any further commands to manipulate the process such as kill or 
stepi report that the process no longer exists.

I also tried letting the process run outside of gdb, then try a 
postmortem on the core dump, but gdb reported all kinds of crazy 
information about the other two threads, like invalid values for the cs 
and ds registers.  I'm getting the sneaking suspicion that there is a 
bug in the kernel where it somehow is allowing the other threads to 
execute, possibly delivering the SIGSEGV to them as well, and they are 
terminating the whole process.

Has anyone run into anything like this?




More information about the ubuntu-devel mailing list