From: EJS <ejshoor@yahoo.com>
To: gdb@sourceware.org
Subject: Trouble remote debugging
Date: Sat, 25 Feb 2006 12:48:00 -0000 [thread overview]
Message-ID: <20060225013054.86448.qmail@web35613.mail.mud.yahoo.com> (raw)
Hi,
I am trying to remote debug a hello world program that
was cross compiled on a cygwin host for a linux target
(using crosstool). The problem that I am having is
that the shared libaries are not being handled
correctly by gdb. Specifically, if run gdb on the
target machine my bt looks like:
(gdb) bt
#0 0x006ae7a2 in _dl_sysinfo_int80 () from
/lib/ld-linux.so.2
#1 0x00784253 in __read_nocancel () from
/lib/tls/libc.so.6
#2 0x00729aa8 in _IO_file_read_internal () from
/lib/tls/libc.so.6
#3 0x0072882e in _IO_new_file_underflow () from
/lib/tls/libc.so.6
#4 0x0072ae0b in _IO_default_uflow_internal () from
/lib/tls/libc.so.6
#5 0x0072abfd in __uflow () from /lib/tls/libc.so.6
#6 0x00725c5f in getc () from /lib/tls/libc.so.6
#7 0x080485ed in main () at hello.cpp:10
Whereas when I try the same bt connected remotely
through gdbserver. I get
(gdb) bt
#0 0x006ae7a2 in ?? ()
#1 0x00784253 in ?? ()
#2 0x007f1ff4 in ?? ()
#3 0x00729aa8 in ?? ()
#4 0x00000000 in ?? ()
#5 0xb7ffe000 in ?? ()
#6 0x00000400 in ?? ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5
-linux-gnu/lib/libstdc++.so.6
#7 0xbffff93c in ?? ()
#8 0x0072882e in ?? ()
#9 0x007f2720 in ?? ()
#10 0xb7ffe000 in ?? ()
#11 0x00000400 in ?? ()
from /opt/crosstool/gcc-3.4.4-glibc-2.3.5
-linux-gnu/lib/libstdc++.so.6
#12 0x007f1ff4 in ?? ()
#13 0x007f2720 in ?? ()
#14 0xb7fe76c0 in ?? ()
#15 0xbffff94c in ?? ()
#16 0x0072ae0b in ?? ()
#17 0x007f2720 in ?? ()
#18 0x007f2720 in ?? ()
#19 0xbffff964 in ?? ()
#20 0x0072abfd in ?? ()
#21 0x007f2720 in ?? ()
#22 0xbffffa24 in ?? ()
#23 0x007f1ff4 in ?? ()
#24 0x007f2720 in ?? ()
#25 0xbffff978 in ?? ()
#26 0x00725c5f in ?? ()
#27 0x007f2720 in ?? ()
#28 0xbffffa24 in ?? ()
#29 0xbffff9b0 in ?? ()
#30 0xbffff998 in ?? ()
#31 0x080485ed in main () at hello.cpp:10
As far as I know, I have set my solib-search-path
correctly and my shlibs are being found as you can see
from:
(gdb) info share
From To Syms Read Shared Object
Library
0x0003b920 0x000a8dc0 Yes
/opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-un
known-linux-gnu/i686-unknown-linux-gnu/lib/libstdc++.so.6
0x00003680 0x0001ac60 Yes
/opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-un
known-linux-gnu/i686-unknown-linux-gnu/lib/libm.so.6
0x00001680 0x000065c0 Yes
/opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-un
known-linux-gnu/i686-unknown-linux-gnu/lib/libgcc_s.so.1
0x000153d0 0x000ebbbc Yes
/opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-un
known-linux-gnu/i686-unknown-linux-gnu/lib/libc.so.6
0x00000760 0x0000f87f Yes
/opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-un
known-linux-gnu/i686-unknown-linux-gnu/lib/ld-linux.so.2
One thing that I noticed is that the symbol tables for
the cross compiled shlibs are different than the ones
on the target (I checked this via objdump -T). Is this
the problem? If so how do I make them the same?
Thanks,
J
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
next reply other threads:[~2006-02-25 1:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-25 12:48 EJS [this message]
2006-02-25 23:18 ` Daniel Jacobowitz
2006-02-27 15:02 ` EJS
2006-02-27 15:07 ` Daniel Jacobowitz
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=20060225013054.86448.qmail@web35613.mail.mud.yahoo.com \
--to=ejshoor@yahoo.com \
--cc=gdb@sourceware.org \
/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