Red Hat Bugzilla – Bug 182096
Can't debug static linked, threaded apps
Last modified: 2008-03-10 20:27:45 EDT
Debugging a threaded, statically linked application gives me:
[fschirme@client102 test]$ gdb test
GNU gdb Red Hat Linux (22.214.171.124-1.84rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols
Using host libthread_db library "/lib/libthread_db.so.1".
Starting program: /home/fschirme/test/test
Reading symbols from shared object read from target memory...(no debugging
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
Cannot find user-level thread for LWP 21818: generic error
The test app (attached) was compiled using: gcc -o test test.c -static
It works without -static. Running gdb with LD_ASSUME_KERNEL=2.4.0 works too.
System is a recent FC4 with all updates installed. Both FC4 IA32 and x86_64
have this problem.
Created attachment 124887 [details]
Whoops. The correct gcc command line is: gcc -o test test.c -static -lpthread
Updated glibc and gcc to FC5T3. Still having this problem. Version adjusted to
Fedora Core 5 and Fedora Core 6 are, as we're sure you've noticed, no longer
test releases. We're cleaning up the bug database and making sure important bug
reports filed against these test releases don't get lost. It would be helpful if
you could test this issue with a released version of Fedora or with the latest
development / test release. Thanks for your help and for your patience.
[This is a bulk message for all open FC5/FC6 test release bugs. I'm adding
myself to the CC list for each bug, so I'll see any comments you make after this
and do my best to make sure every issue gets proper attention.]
The information we've requested above is required in order
to review this problem report further and diagnose/fix the
issue if it is still present. Since there have not been any
updates to the report since thirty (30) days or more since we
requested additional information, we're assuming the problem
is either no longer present in the current Fedora release, or
that there is no longer any interest in tracking the problem.
Setting status to "INSUFFICIENT_DATA". If you still
experience this problem after updating to our latest Fedora
release and can provide the information previously requested,
please feel free to reopen the bug report.
Thank you in advance.