This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

thread debugging with gdb on ARM


I'm encountering a problem when debugging threads with gdb. The problem is similar to others I've seen on the mailing list but I've either made sure I'm not making the same mistakes (correct libthread_db, for example) or they're so old, I can't imagine the bugs are still relevant.

I'm running uclibc 0.9.29 for ARM. gdb 6.7.1 was compiled and linked against this uclibc.

Anyhoo, I think the root of my problem has to do with the following warning:
"warning: Cannot initialize thread debugging library: generic error"

Also, GDB keeps trapping SIG32 unless I do a 'handle SIG32 nostop' -- but I get the impression I shouldn't have to do that.

Any idea what I could be doing wrong?


Runtime output:


'ps' shows about 10-11 threads running but 'info threads' in gdb only shows 2.

# ps
...
 338 0         13588 S   gdb --args ./bin/app
 339 0          3056 T   ./bin/app
 342 0          3056 T   ./bin/app
 343 0          3056 T   ./bin/app
 344 0          3056 T   ./bin/app
 345 0          3056 T   ./bin/app
 346 0          3056 T   ./bin/app
 347 0          3056 T   ./bin/app
 348 0          3056 T   ./bin/app
 349 0          3056 T   ./bin/app
 350 0          3056 T   ./bin/app
...

GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-uclibcgnueabi"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) handle SIG32 nostop
Signal Stop Print Pass to program Description
SIG32 No Yes Yes Real-time event 32
(gdb) break sigwait
Breakpoint 1 at 0xe154
(gdb) cont
The program is not being run.
(gdb) run
Starting program: ...


Program received signal SIG32, Real-time event 32.

Program received signal SIG32, Real-time event 32.
Breakpoint 1 at 0x1a56bdfc
warning: Cannot initialize thread debugging library: generic error (~10 times)


Program received signal SIG32, Real-time event 32. (~10 more times...)

[New LWP 350]
[New LWP 343]

<I hit ctrl-c (have to hit it twice for some reason)>

Program received signal SIGINT, Interrupt.
[Switching to LWP 343]
0x1a70daf0 in TimeUtils::addOffset (t=0x3e5ffc60, msecs=100)
   at ../../../../TimeUtils.h:68
68      ../../../../TimeUtils.h: No such file or directory.
       in ../../../../TimeUtils.h
(gdb) info threads
* 2 LWP 343  0x1a70daf0 in TimeUtils::addOffset (t=0x3e5ffc60, msecs=100)
   at ../../jhcommon/include/TimeUtils.h:68
 1 LWP 350  0x1a82f44c in sigsuspend () from /lib/libc.so.0
(gdb)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]