Bug 9526 - followed child breaks in _dl_debug_state
Summary: followed child breaks in _dl_debug_state
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: unknown
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-02 17:18 UTC by Tom Tromey
Modified: 2012-10-24 16:43 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2008-03-02 17:18:01 UTC
[Converted from Gnats 2421]

I set detach-on-fork=off and follow-fork-mode=child.
I applied my fix for PR 2420.
Then I ran gcc.  This exec'd cc1, which gdb followed.
At this point, cc1 stopped.  (Note also the warning here...)

(gdb) r
Starting program: /home/tromey/gnu/incremental/install/bin/gcc /home/tromey/gnu/incremental/trunk/gcc/testsuite/gcc.dg/cpp/19930510-1.c -ansi -pedantic-errors -fno-show-column -S -o 19930510-1.s
[Thread debugging using libthread_db enabled]
[New Thread 0xb7fe96c0 (LWP 29885)]
[New process 29888]
Executing new program: /home/tromey/gnu/incremental/install/libexec/gcc/i686-pc-linux-gnu/4.4.0/cc1
warning: Cannot initialize thread debugging library: generic error
[New process 29888]
[Thread debugging using libthread_db enabled]
[New Thread 0xb7fe96c0 (LWP 29888)]

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0xb7fe96c0 (LWP 29888)]
0x00a3d7a1 in _dl_debug_state () from /lib/ld-linux.so.2


(gdb) bt
#0  0x00a3d7a1 in _dl_debug_state () from /lib/ld-linux.so.2
#1  0x00a329e6 in dl_main () from /lib/ld-linux.so.2
#2  0x00a42d6b in _dl_sysdep_start () from /lib/ld-linux.so.2
#3  0x00a302b8 in _dl_start () from /lib/ld-linux.so.2
#4  0x00a2f817 in _start () from /lib/ld-linux.so.2


If I "cont" here, I can debug cc1 ok.

Release:
unknown

Environment:
x86 FC-6
Comment 1 Pedro Alves 2012-10-24 16:43:05 UTC
> warning: Cannot initialize thread debugging library: generic error
...
> Program received signal SIGTRAP, Trace/breakpoint trap.

Fork support (more so with threads in the mix) was pretty weak back in 2008.
Should be fixed now.