Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
	gdb-patches@sourceware.org, Tom Tromey <tromey@redhat.com>
Subject: Re: FYI: fix 2 tests when glibc debuginfo is installed
Date: Tue, 25 Oct 2011 19:50:00 -0000	[thread overview]
Message-ID: <201110252033.51826.pedro@codesourcery.com> (raw)
In-Reply-To: <20111025183022.GA25438@redhat.com>

On Tuesday 25 October 2011 19:30:22, Oleg Nesterov wrote:
> On 10/25, Pedro Alves wrote:
> >
> > On Tuesday 25 October 2011 18:32:49, Oleg Nesterov wrote:

> > > But, compared to the old kernels, the tracee "remembers" the
> > > fact it was stopped, and it will stop again after DETACH. Unless SIGCONT
> > > in between.
> >
> > What about PTRACE_CONT in between (no SIGCONT)?  Does it make the
> > kernel "forget" the fact that the child was stopped before?
> 
> No,

Ah, cool.

> > If not, what happens if the ptracer dies while its child
> > is PTRACE_CONT'ed, and the child was stopped at PTRACE_ATTACH time?
> 
> This doesn't differ from the explicit PTRACE_DETACH.
> 
> Actually, this is very simple. We have the per-process (_not_
> per thread/tracee) flag, SIGNAL_STOP_STOPPED. It means that this
> thread group is stopped (OK, it is not that simple, but we can ignore
> details). ptrace can never set/clear this flag. In particular it
> is still set after PTRACE_CONT or whatever resumes the tracee.
> Only SIGCONT clears SIGNAL_STOP_STOPPED.
> 
> Now, __ptrace_unlink() (called by PTRACE_DETACH or by the dying
> tracee) checks SIGNAL_STOP_STOPPED, if it is set we ask the tracee
> to stop again.

Thanks!  All makes sense now.

-- 
Pedro Alves


  reply	other threads:[~2011-10-25 19:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-14 16:05 Tom Tromey
2011-10-14 19:37 ` Jan Kratochvil
2011-10-14 21:19   ` Pedro Alves
2011-10-14 21:25     ` Jan Kratochvil
2011-10-14 21:42       ` Pedro Alves
2011-10-15 14:52         ` Oleg Nesterov
2011-10-25 17:03           ` Pedro Alves
2011-10-25 17:38             ` Oleg Nesterov
2011-10-25 18:16               ` Pedro Alves
2011-10-25 18:38                 ` Oleg Nesterov
2011-10-25 19:50                   ` Pedro Alves [this message]
2011-10-16 16:41       ` Jan Kratochvil

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=201110252033.51826.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=oleg@redhat.com \
    --cc=tromey@redhat.com \
    /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