Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Teresa Rivas <teresa.rivas@cadenux.com>
To: gdb@sources.redhat.com
Subject: gdb debugging threads help
Date: Fri, 18 Nov 2005 00:35:00 -0000	[thread overview]
Message-ID: <1132274170.32154.20.camel@localhost.localdomain> (raw)

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?



             reply	other threads:[~2005-11-18  0:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-18  0:35 Teresa Rivas [this message]
2005-11-18  1:19 ` Jim Blandy
2005-11-18  2:36 ` Daniel Jacobowitz
2005-11-18 14:30   ` Teresa Rivas
2005-11-18 14:38     ` Teresa Rivas
2005-11-18 15:28     ` Daniel Jacobowitz
2005-11-18 16:49       ` Teresa Rivas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1132274170.32154.20.camel@localhost.localdomain \
    --to=teresa.rivas@cadenux.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox