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]

gdb debugging threads help


Hi,

I need to debug multi-threaded applications that runs on an arm platform
in my x86 platform but I can't make that gdb compile and build the
thread-db sources. This is the way I configured gdb:

./configure --host=i386-linux --program-prefix=arm-linux-
--target=arm-linux

and this is the way I configure gdbserver:

./configure --host=arm-linux --program-prefix=arm-linux-
--target=arm-linux

this are the libraries in the target and which paths I set in gdb using
set solib-absolute-prefix and set solib-search-path commands:

-rwxr-xr-x  1 trivas trivas   91306 2005-11-17 08:12
libpthread-0.9.26.so
lrwxrwxrwx  1 trivas trivas      20 2005-11-17 08:12 libpthread.so ->
libpthread-0.9.26.so
lrwxrwxrwx  1 trivas trivas      20 2005-11-17 08:12 libpthread.so.0 ->
libpthread-0.9.26.so
-rwxr-xr-x  1 trivas trivas   19300 2005-11-17 16:36
libthread_db-0.9.26.so
lrwxrwxrwx  1 trivas trivas      22 2005-11-17 08:12 libthread_db.so ->
libthread_db-0.9.26.so
lrwxrwxrwx  1 trivas trivas      22 2005-11-17 08:12 libthread_db.so.0
-> libthread_db-0.9.26.so
lrwxrwxrwx  1 trivas trivas      22 2005-11-17 17:03 libthread_db.so.1
-> libthread_db-0.9.26.so

the problem is that I can't see the treads created when I am debugging
the application, only the main thread:

on the target:
# gdbserver :5234 simple
Process simple created; pid = 91
Listening on port 5234
Remote debugging from host 192.168.200.29
thread 1 created
thread 2 created
Glory, employees contents was always consistent

Child exited with retcode = 0

Child exited with status 0
GDBserver exiting


on the host:
GNU gdb 6.3
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-linux --target=arm-linux".
(gdb) set solib-absolute-prefix /target/arm-linux/lib
(gdb) set solib-search-path /target/arm-linux/lib
(gdb) dir /target/arm-linux/lib
Source directories searched: /target/arm-linux/lib:$cdir:$cwd
(gdb) set endian little
The target is assumed to be little endian
(gdb) target remote 192.168.200.199:5234
Remote debugging using 192.168.200.199:5234
0x40000c60 in ?? ()
(gdb) handle SIG32 nostop noprint pass
Signal        Stop      Print   Pass to program Description
SIG32         No        No      Yes             Real-time event 32
(gdb) add-symbol-file simple
add symbol table from file "simple" at
(y or n) y
Reading symbols
from /home/trivas/dm320-appro/fs/examples/threads/simple...done.
(gdb) b 87
Breakpoint 1 at 0x8834: file simple.c, line 87.
(gdb) b 122
Breakpoint 2 at 0x8a68: file simple.c, line 122.
(gdb) c
Continuing.

Breakpoint 1, main (argc=1, argv=0xbefffed4) at simple.c:90
90          for (i=0; i<60000; i++) {
(gdb) info threads
  1 Thread 47  main (argc=1, argv=0xbefffed4) at simple.c:90
(gdb) c
Continuing.

Breakpoint 2, main (argc=1, argv=0xbefffed4) at simple.c:123
123         printf("Glory, employees contents was always consistent\n");
(gdb) info threads
  1 Thread 47  main (argc=1, argv=0xbefffed4) at simple.c:123
(gdb) c
Continuing.

Program exited normally.
(gdb)

and if I try a info shared it says "No shared libraries loaded at this
time"

I see there is a thread-db.o target on the gdb/Makefile file but I can't
configure gdb so it execute this thread-db.o target which I believe add
the gdb debbug thread support.

Have had somebody a similar problem or an idea that can help me?



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