On Wed, 17 Mar 2010 17:34:58 -0400 "Paul Koning" <[email protected]> wrote:
> I'm working on adding thread debug support to gdb to handle the > kernel-based pthreads support that showed up in 5.0. > > The basics are easy enough and I have that working. (This will be > submitted to the FSF GDB team.) Great! I could really use this functionality ASAP for analyzing PR pkg/42988 if you need an early beta tester. > So what happens, if I correctly interpreted my debug sessions, is that > one thread hits the breakpoint, sets p_xstat to 5, calls sigswitch() to > get some other LWP scheduled. However, the LWP that's picked is one of > the other threads for the same process. It's continuing from a break, > so it calls sigchecktrace() to see if gdb gave it a signal. > sigchecktrace returns what's in p_xstat, which is 5, so a break is > delivered to the process, which kills it. Doh! I think this is exactly the issue I'm seeing with firefox dying after stopping on my breakpoint. Don't know what the right fix is, though. Cheers, -Tobias
