This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFA] Clean up spurious SIGSTOPS in lin-lwp
Mark Kettenis wrote:
>
> Date: Fri, 25 May 2001 15:57:39 -0700
> From: Michael Snyder <msnyder@cygnus.com>
>
> Mark,
>
> This patch will get rid of most of those "Delayed SIGSTOP" messages,
> so that lin_lwp_wait will rarely if ever get a SIGSTOP that was generated
> by gdb. It entails three basic changes:
>
> * In lin_lwp_attach_lwp, consume the SIGSTOP that is generated by
> PTHREAD_ATTACH.
> * In stop_wait_callback, try again to consume the SIGSTOP after
> "pushing back" a SIGTRAP for a thread other than the event thread.
> * Similarly try again to consume a SIGSTOP after tossing away a
> redundant SIGINT.
>
> In principle the current approach saves us a few system calls, at the
> risk of a GDB-generated SIGSTOP colliding with a SIGSTOP that wasn't
> generated by GDB.
>
> I assume you're trying to make GDB behave a little better when some
> outside agency is generating SIGSTOPs.
No, I'm working on a bug, and trying to simplify parts of the
event handling in order to clear the way. The bug that I'm really
aiming for is a scheduling issue -- gdb can cause some threads
to starve. Don't worry, it isn't your fault, it's been in all of
the linux thread debugging implementations so far. It causes a
couple of failures in the testcase "pthreads.exp". I know in
principal what to do, but in practice it's proving to be tricky.
I've checked in this part of the change.
Michael