Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] Delay deletion of step-resume breakpoints
Date: Mon, 13 Aug 2007 21:37:00 -0000	[thread overview]
Message-ID: <20070813213715.GA25303@caradoc.them.org> (raw)
In-Reply-To: <200708132113.l7DLDWEw021526@brahms.sibelius.xs4all.nl>

On Mon, Aug 13, 2007 at 11:13:32PM +0200, Mark Kettenis wrote:
> The change you made to the comment:
> 
> >    /* NOTE: this will take care of any left-over step_resume breakpoints,
> > -     but not any user-specified thread-specific breakpoints. */
> > +     but not any user-specified thread-specific breakpoints.  We can not
> > +     delete the breakpoint straight-off, because the inferior might not
> > +     be stopped at the moment.  */
> 
> Makes me suspect this is just a workaround for another bug, the bug
> being that the inferior isn't properly stopped when this code gets
> called.

That's supposed to be not a bug - I think.  We've detected a thread
exit while waiting for an interesting event; since thread exit isn't
generally considered "interesting" in this context, we keep waiting.
If your OS stops all threads for you at every event (HP/UX ttrace
does, I think) then that doesn't matter.  If your OS doesn't (Solaris
PR_ASYNC, GNU/Linux) then you might detect that thread exit while the
other threads are not yet stopped.

Or something else might have already resumed the other threads; I am
working on remote protocol notifications for stopped threads, and I
don't want to leave the entire target stopped while waiting for GDB to
ack.  Jim's come up with a sensible design I can reuse for this,
we'll post it soon I hope.

So we can delay deleting the thread until the next time we need to
stop all threads, but that's awkward - see record_dead_thread in
linux-nat.c.  Or we can let delete_thread handle the problem.

So should delete_thread be callable when the target is running or
should any target that might call it when the target is not running
maintain its own list the way the Linux native layer does?  We don't
have any formal specifications on what can be called when :-(

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-08-13 21:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13 21:03 Daniel Jacobowitz
2007-08-13 21:13 ` Mark Kettenis
2007-08-13 21:37   ` Daniel Jacobowitz [this message]
2007-08-27 20:11     ` Daniel Jacobowitz
2007-08-14  3:12   ` Eli Zaretskii
2007-09-10 21:27 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070813213715.GA25303@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox