uclibc pthreads debugging troubles with recent tools

Clem Taylor clem.taylor at gmail.com
Fri Jun 30 20:31:36 UTC 2006


Hi,

A few weeks ago I updated my buildroot, uclibc, gcc and bintools to
current versions. Everything seems to be working, except the other day
we discoved gdb doesn't seem to want to debug pthread applications.

My new toolchain is based on gcc 4.1.1, uclibc-20060511, buildroot
r15073 (also updated to r15541), and gdb 6.3 (also tried 6.4 and 6.5).
The working version was gcc 3.4.4, binutils-2.16.91.0.3, a
uClibc-snapshot from 2005/09/27, buildroot r11311 and gdb 6.3.

It looks like gdb doesn't fully realize that it is debugging a
threaded app, with the old stuff gdb says '[Thread debugging using
libthread_db enabled]', but I don't get this message with the new
stuff. When you ctrl-c in gdb, the parent process stops, but the child
thread keeps running. It's doesn't seem to be something easy like
missing symbols, both systems have all the libraries stripped except
for libpthread-0.9.28.so.

So does anyone have gdb debugging pthread apps with tools (especially
on mipsel). I was hoping someone could give me a hint as to what
combination has worked recently. I tried rolling back to the old
uClibc and it still doesn't work, so it must be some sort of
interaction with the other components. I'll try going back to an
ealier compiler and bin tools (but I'd rather stick with gcc 4.1.1),
rolling back the buildroot would require some effort (due to other
changes).

On the working version I get:
GNU gdb 6.3
This GDB was configured as "mipsel-linux-uclibc"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
...
[Thread debugging using libthread_db enabled]
[New Thread 1024 (LWP 27997)]
[New Thread 2049 (LWP 28000)]
[New Thread 1026 (LWP 28001)]

On the broken version:
GNU gdb 6.3
This GDB was configured as "mipsel-linux-uclibc"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
...
Program received signal SIG32, Real-time event 32.
0x2ac15be4 in ?? ()
(gdb) c
<ctrl-c>
Program received signal SIGINT, Interrupt.
0x2ac14084 in ?? ()

                                         Thanks,
                                         Clem



More information about the uClibc mailing list