[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gdb] Re: cannot debug any threaded/fork program
From: |
Ricardo Nabinger Sanchez |
Subject: |
[Gdb] Re: cannot debug any threaded/fork program |
Date: |
Wed, 25 Aug 2004 09:59:51 -0300 |
Quoting Ricardo Nabinger Sanchez <address@hidden>
Sent on Tue, 24 Aug 2004 17:47:25 -0300
> 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.
additionally, if I rearrange my code in order to the main process do the
thread creation and then go to the point I want do debug, I fall into this:
Program received signal SIGTRAP, Trace/breakpoint trap.
0x400d32e1 in sigpending () from /lib/libc.so.6
(gdb)
continuing under these conditions isn't of much help, as gdb doesnt catch
anything else.
also, should gdb detect thread creations via clone() ? I think so, because
libpthread do that, but in the following example (from Linus) no gdb I've
used detected the new threads:
http://www.tldp.org/FAQ/Threads-FAQ/clone.c
I've tried gdb versions 5.1, 5.3, 6.1 and 6.2 on differents glibc/gcc
combinations. I'm not sure about the thread support, but as I receive the
"Using host libthread_db library" I'll assume it is working properly.
I'm trying to get some time to debug gdb, I hope I can handle it :)
thanks again.
--
Ricardo Nabinger Sanchez
GNU/Linux #140696 [http://counter.li.org]
Slackware Linux + FreeBSD
Measure with a micrometer. Mark with chalk. Cut with an axe.