This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog inf-ttrace.c
- From: brobecke at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 13 Jan 2011 16:23:34 -0000
- Subject: src/gdb ChangeLog inf-ttrace.c
CVSROOT: /cvs/src
Module name: src
Changes by: brobecke@sourceware.org 2011-01-13 16:23:34
Modified files:
gdb : ChangeLog inf-ttrace.c
Log message:
[hpux/ttrace] Determine attached process LWP immediately after attaching.
When attaching to a process, the ttrace interface was creating a ptid
with a null LWP, because it did not have it yet. This LWP was then
set as soon as we received our first event from our inferior, during
our first wait. Similarly, the allocation of the thread private info
was also defered.
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).
It is actually possible, however, to determine the thread's LWP.
This change therefore adjusts the attach code to create a thread with
the correct LWP set, as well as with its private info allocated.
Same thing for all the other threads.
gdb/ChangeLog:
[ttrace] Compute thread list immediately after attach.
* inf_ttrace_attach (inf_ttrace_create_threads_after_attach):
New subprogram.
(inf_ttrace_attach): Use it.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12470&r2=1.12471
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/inf-ttrace.c.diff?cvsroot=src&r1=1.57&r2=1.58