[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gdb] cannot debug any threaded/fork program
From: |
Ricardo Nabinger Sanchez |
Subject: |
[Gdb] cannot debug any threaded/fork program |
Date: |
Tue, 24 Aug 2004 17:47:25 -0300 |
hello,
I'm trying to debug a program which has 3 threads (pthreads). the main
problem is that gdb doesn't detect the threads, althought it stops if I set
a breakpoint and some of the threads reach it, but then gdb seems to lost
control and the debugging session gets unreliable.
this is my environment:
* Linux kernel 2.4.25
* glibc-2.3.2 (with and without debugging info versions)
* gcc-3.3.4, with posix thread model
* binutils 2.15.90.0.3 20040415
* gdb 6.2 and 5.3
* pthreads 0.10
this is the output of gdb:
---------------------------------------------------------------------------
GNU gdb 6.2
[...]
This GDB was configured as "i486-slackware-linux"...Using host libthread_db
library "/lib/libthread_db.so.1".
(gdb) handle SIG32 nostop noprint pass
Signal Stop Print Pass to program Description
SIG32 No No Yes Real-time event 32
(gdb) r
Starting program: rmon2
conversor: pid 19303
Servidor está rodando com PID: 19304
fila: pid 19305
---------------------------------------------------------------------------
as you can notice, the 3 "pid" messages are from each new thread. so I have
3 threads running (they are truly active), and the main process joins them.
I've already tried gdb version 5.3, but without success. the threads are
not detected, and ``info threads'' gives nothing. ``thread 1'' gives an
error message, telling that the ID is unknown.
I've also tried some variations: fork() and clone() to create
childs/threads, but even so gdb didn't detected them.
I think both gdb-6.2 and 5.3 have thread support, because they throwned
warnings telling me I wouldn't have thread support when I renamed
libthread_db.
any ideas?
thanks in advance.
Ricardo Nabinger Sanchez
- [Gdb] cannot debug any threaded/fork program,
Ricardo Nabinger Sanchez <=