From: "Nai-Hsien" <dennis@loop.com.tw>
To: "Daniel Jacobowitz" <drow@false.org>
Cc: <gdb@sourceware.org>
Subject: Re: Debugging a shared library through gdbserver
Date: Wed, 15 Mar 2006 12:25:00 -0000 [thread overview]
Message-ID: <064501c647f8$39e135c0$0102000a@loop.com.tw> (raw)
In-Reply-To: <20060315034555.GA1813@nevyn.them.org>
>
> Why are you doing any of this? Please tell us where you saw
> suggestions to use add-symbol-file in this way, so that we can correct
> them.
>
> Please take a look at "set solib-absolute-prefix". Use that, and
> the "file" command, before connecting to gdbserver and everything
> should work automatically.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
>
Hi Daniel
Nobody told me to do this. I just learned add-symbol-file from u-boot
document to relocate
program base. I tried some commands in gdb user's manual then I think this
command has result most
close to my expectation. Anyway, this is totally my fault.
I tried to follow your hint, shown as blow. Now, I can set a breakpoint in
the shared library and make
the program stop there. However, I still can not see the source code. (I am
using DDD with gdb.)
Am I still doing something wrong?
Thank you
Dennis
# my shared library is in lib/
(gdb) set solib-absolute-prefix lib
(gdb) file console
(gdb) target remote 10.0.2.3:2001
0x0fd39fac in ?? ()
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
(gdb) b user_str_to_id
Breakpoint 1 at 0x10040040
(gdb) c
Breakpoint 1, 0x10040040 in ?? ()
# the program stop here without displaying source code on screen.
(gdb)
next prev parent reply other threads:[~2006-03-15 6:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-15 3:44 Nai-Hsien
2006-03-15 4:16 ` Daniel Jacobowitz
2006-03-15 12:25 ` Nai-Hsien [this message]
2006-03-15 16:17 ` Daniel Jacobowitz
2006-03-16 2:11 ` Nai-Hsien
2006-03-16 3:00 ` 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='064501c647f8$39e135c0$0102000a@loop.com.tw' \
--to=dennis@loop.com.tw \
--cc=drow@false.org \
--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