This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 5/8] inf-ttrace: Determine attached process LWP immediately after attaching.
> > This works on PA/HP-UX, because we immediately perform a wait to pop
> > the event triggered by the attach. We can use that event to extract
> > the thread's LWP. But this does not work for IA64/HP-UX, because
> > the attach no longer triggers an event, and thus a wait should NOT
> > be performed (such a wait would simply block indefinitely).
>
> How you can get by without setting target_attach_no_wait then?
There is a global variable inf_ttrace_num_lwps that inf_ttrace_wait
checks to see if it needs to set the main thread's tid. The thread
iteration loop that I'm adding increments that counter every time
I add a new thread, so the code doesn't trigger in the "attach" case.
But it still does when doing a "run".
--
Joel