Problem debugging a multi threaded program using gdb
I am debugging a multi-threaded program remotely on the target from another host, using 'gdbserver' on the target and 'gdb' on the host. I do the following:
target# gdbserver localhost:4567 ./my_prog
Process ./my_prog created; pid = 934
Listening on port 4567
host# arm-none-linux-gnueabi-gdb /home/asabat/targetfs/home/my_prog
(gdb) set sysroot /home/asabat/targetfs/
(gdb) set solib-search-path /home/asabat/targetfs/lib/
(gdb) target remote 10.101.24.118:4567
Remote debugging using 10.101.24.77:4567
(gdb) continue
When I stop it using a breakpoint and check the thread details using the command 'info threads', it shows only one thread. However, there are three threads running on the target for this program being debugged.
host#
(gdb) info threads
[New Thread 1061]
2 Thread 1061 main (argc=1, argv=0xbeefadd4) at ./src/um_main.c:103
* 1 Thread <main> main (argc=1, argv=0xbeefadd4) at ./src/um_main.c:103
target# ps -eLf
root 1051 918 1051 0 1 23:32 ttyS2 00:00:00 gdbserver localhost:4567 ./my_prog
root 1052 1051 1052 0 3 23:32 ttyS2 00:00:00 ./my_prog
root 1052 1051 1053 0 3 23:33 ttyS2 00:00:00 ./my_prog
root 1052 1051 1054 0 3 23:33 ttyS2 00:00:00 ./my_prog
root 1055 939 1055 0 1 23:37 pts/0 00:00:00 /usr/bin/ps -eLf
Previously I have done debugging of multi threaded programs using gdb and it used to work fine. I don't have any clue what I am missing here. I went through the gdb manual and couldn't find anything related.
Last edited by Ajay Kumar; 12-29-2011 at 09:29 AM.
Reason: wrong title line
|