This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdbserver ptrace not doing waitpid after attaching to threads?
On Fri, Dec 12, 2008 at 03:06:44PM -0800, Doug Evans wrote:
> I mightn't have been clear enough btw. I'm observing these things
> from doing an attach in gdb. Example below.
Oh! Well then. Sounds like it's gotten broken. I know we've fixed
this at least once before.
> This is the first attach that gdbserver does, the one for the process.
> Might it be possible that one has to wait for SIGSTOP even before
> ptrace (SETOPTIONS)? :-)
Yes, that's correct. A bit silly, but correct.
> For clarification, your comment:
>
> > It shouldn't be
> > doing any ATTACH; instead it should be trusting SETOPTIONS to deliver
> > new threads to it via wait.
>
> was for the case where gdbserver starts the program, and not for the
> case where gdbserver attaches to the program, right?
Well, it's for any thread created once the program is running under
gdbserver control. Which amounts to the same thing here.
--
Daniel Jacobowitz
CodeSourcery