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]

pthreads debug with gdbserver


Hi,

Im using gbd 6.2 + gdbserver for m68k target and able to debug programs with 
it. But when I tried to debug application with pthreads I could not get 
correct threads information.
During debbuging I receive a well known SIG32 but searching this mail list I 
did not find the solution for my problem.
What I did:
******************************************************************************************
[root@Vlad]# ./m68k-linux-gdb
GNU gdb 6.2
Copyright 2004 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 "--host=i686-pc-linux-gnu --target=m68k-linux".
(gdb) file /tftpboot/Linux_BSP2/rootfsdir/bin/hello
Reading symbols from 
/opt/Embedix/home/vladimir/project/rootfsdir/bin/hello...done.
(gdb) maintenance info breakpoints
Num Type           Disp Enb Address    What
-1  longjmp resume keep n   0x00000000
(gdb) set solib-absolute-prefix /tftpboot/Linux_BSP2/rootfsdir/
(gdb) target remote 192.168.1.27:3000
Remote debugging using 192.168.1.27:3000
0x400020c0 in ?? ()
(gdb) maintenance info breakpoints
Num Type           Disp Enb Address    What
-1  longjmp resume keep n   0x00000000
-2  shlib events   keep y   0x4000dd04
(gdb) c
Continuing.

Program received signal SIG32, Real-time event 32.
0x400a8b2e in ?? ()
(gdb) maintenance info breakpoints
Num Type           Disp Enb Address    What
-1  longjmp resume keep n   0x00000000
-2  shlib events   keep y   0x4000dd04
        breakpoint already hit 3 times
***************************************************************************************************
I see that shlib breakpoint is set and hit but gdb does not load the 
libraries. I can see in strace that it successfully loads ld.so. What should 
I look at?
Next, what libthread_db.so is for? It was not included for compilation for 
m68k target and I added it manually but when I try to load all libraries 
manually using add-symbol-file, every library loads fine except 
libthread_db.so - gdbserver reports "gbd: error initializing thread_db 
library."
If I type in gdb:
	info threads
I always get only one thread.
p.s. All libraries are not stripped.


Any help would be very appreciated.


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