This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
TARGET_SIGNAL_TRAP
- From: David Carlton <carlton at kealia dot com>
- To: gdb <gdb at sources dot redhat dot com>
- Date: Thu, 17 Jul 2003 11:29:44 -0700
- Subject: TARGET_SIGNAL_TRAP
Some users here have noted that they have a hard time debugging
multithreaded code in GDB. We're assuming that it's probably a bug in
our code instead of in GDB: it's just that GDB is changing the timing
of the threads in ways that expose a latent bug in our code.
Which made me curious: why does GDB change the timing of programs? I
set a breakpoint in handle_inferior_event, and I see all these events
claiming to be TARGET_SIGNAL_TRAPs. But I haven't set any breakpoints
or watchpoints! So what causes all these traps to be generated? Or
am I misunderstanding the situation? (I'm not at all sure that this
is specific to multithreaded code - it may just be that its effects
are most pronounced for multithreaded code, because single-threaded
code doesn't have as much timing to be thrown off.)
David Carlton
carlton@kealia.com