This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH, gdbserver] Scan for existing threads during attachment on Linux
Sorry, I missed this before.
On Monday 23 May 2011 11:37:53, Pedro Alves wrote:
> > + /* Mark the threads as stopped. */
> > + if (!non_stop)
> > + for_each_inferior (&all_threads, set_resume_kind_stop);
You don't want to do this to all_threads. You want to do
this to the threads of PID. Might as well do it in the
loop you've added, right after attaching to each lwp?
There's a comment in linux_attach_lwp_1 that is now stale:
> ??? If the process already has several threads we leave the other
> threads running.
Pedro Alves