This is the mail archive of the gdb@sources.redhat.com 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]

Re: configuring gdb 5.x for use with threads


Hi,.

I rebuild my glibc+linuxthreads 2.2.4 agains my linuxkernel 2.4.15-pre5 SMP, a libthread_db-1.0.so was build.
I rebuild gdb 2001-11-16-cvs, it detected thread_db.h, even loads libthread_db.so.1 on startup. However I still can't debug multi-threaded apps. 

here's some output and the programm used to generate it.

can someone please tell me what I've done wrong or point me to the docs, I'll read.

regards,
Peter Zijlstra

---

peter@twins queue $ gcc -ggdb3 -o test test.c queue.c -D_REENTRANT -lpthread
peter@twins queue $ gdb ./test
GNU gdb 2001-11-16-cvs
Copyright 2001 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 "i686-pc-linux-gnu"...
(gdb) run
Starting program: /home/peter/code/queue/./test 

Program received signal SIG32, Real-time event 32.
0x40068bc9 in sigsuspend () from /lib/libc.so.6
(gdb) bt
#0  0x40068bc9 in sigsuspend () from /lib/libc.so.6
#1  0x4002d6cf in pthread_getconcurrency () from /lib/libpthread.so.0
#2  0x4002ce99 in pthread_create () from /lib/libpthread.so.0
#3  0x08049206 in queue_create (queue_size_=16, workers_=3, reaper_=0x804890c <my_reaper>) at queue.c:160
#4  0x0804896e in main (argc=1, argv=0xbffff834) at test.c:38
#5  0x40057921 in __libc_start_main () from /lib/libc.so.6
(gdb) cont
Continuing.

Program received signal SIG32, Real-time event 32.
0x40068bc9 in sigsuspend () from /lib/libc.so.6
(gdb) 
Continuing.

Program received signal SIG32, Real-time event 32.
0x40068bc9 in sigsuspend () from /lib/libc.so.6
(gdb) 
Continuing.

Program received signal SIG32, Real-time event 32.
0x40068bc9 in sigsuspend () from /lib/libc.so.6
(gdb) 
Continuing.
==> starting packet 2, 12582912
==> starting packet 1, 13369344
==> starting packet 3, 12845056
<== ending packet: 2

Program received signal SIG32, Real-time event 32.
0x40068bc9 in sigsuspend () from /lib/libc.so.6
(gdb) ==> starting packet 4, 14155776
<== ending packet: 1
==> starting packet 5, 14417920
<=> wasting packet 1

<snip>

<== ending packet: 15
<=> wasting packet 15
<=> wasting packet 16
Quit
(gdb) info threads
(gdb) cont
Continuing.
==> starting packet 17, 9175040
==> starting packet 19, 8650752
==> starting packet 18, 8388608
<== ending packet: 17

...

Attachment: test.c
Description: Text document

Attachment: queue.c
Description: Text document

Attachment: queue.h
Description: Text document


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