[4/7] Adjust the ttrace target (HP-UX) to always register the main thread

Pedro Alves pedro@codesourcery.com
Fri Aug 8 17:24:00 GMT 2008


Thanks a lot John,

On Friday 08 August 2008 17:40:13, John David Anglin wrote:

> (gdb) bt
> #0  0x000c9960 in inf_ttrace_delete_dying_threads_callback
> (info=0x4007bdb0, arg=0x0) at ../../src/gdb/inf-ttrace.c:828
> #1  0x0008b640 in iterate_over_threads (
>     callback=@0x4001a712: 0xc9940
> <inf_ttrace_delete_dying_threads_callback>, data=0x0) at
> ../../src/gdb/thread.c:338
> #2  0x000c98e0 in inf_ttrace_resume (ptid=
>       {pid = 0, lwp = 16961, tid = 7024758}, step=1073949720,
>     signal=TARGET_SIGNAL_0) at ../../src/gdb/inf-ttrace.c:854
> #3  0x000a3390 in target_resume (ptid={pid = 0, lwp = 16961, tid =
> 7024758}, step=0, signal=TARGET_SIGNAL_0) at ../../src/gdb/target.c:1789 #4
>  0x00087f88 in resume (step=0, sig=TARGET_SIGNAL_0)
>     at ../../src/gdb/infrun.c:1123
> #5  0x000c6db8 in startup_inferior (ntraps=1074249136)

I wasn't setting the private thread info in the main thread
in inf_ttrace_wait, when getting there from a fork_inferior; but, I
was setting it on inf_ttrace_attach.  Since this is a
!target_attach_no_wait target (there's always a target_wait
after an attach), I just moved the setting of the private
info always to inf_ttrace_wait.

Could you check this version please?

-- 
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 004-ttrace_always_a_thread.diff
Type: text/x-diff
Size: 5618 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20080808/7c2256a8/attachment.bin>


More information about the Gdb-patches mailing list