This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb and multi-threaded (NPTL) programs


I think some of this discussion is missing the point.  A debugger
should let the user examine the program's behavior while disturbing it
as little as possible.  If the debugger happens to be implemented
using signals, and those signal disturb the program's behavior, then
that's a flaw.

The call to sem_wait should probably be wrapped in a loop that checks
for EINTR, but that's beside the point.  Running the program under the
debugger shouldn't even change the number of times the thread goes
around the EINTR loop.

So I'm agreeing with Daniel, I guess: it's a kernel bug.  But it
sounds to me like Daniel is saying that you need to find some change
to the non-debugging behavior that would also fix the debugging
behavior, which I don't agree with.  In theory, you should change the
debugging behavior and have no effect on the syscall's interface to
the code that calls it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]