From: "karthikeyan.s" <informkarthik@gmail.com>
To: gdb@sourceware.org
Subject: [ARM] dlopen and remote debugging
Date: Thu, 24 Jun 2010 18:12:00 -0000 [thread overview]
Message-ID: <AANLkTil7rQGoNWEmTUk1fx_C17SpH0EOGf8XNBynAtc9@mail.gmail.com> (raw)
Hi,
We recently encountered an issue with gdb wherein it does not get the
symbols from a shared library when loaded with dlopen. The following
steps does not give us the shared library's symbols. The binary is
Xorg.
1)
<target> gdbserver :10000 /usr/bin/X -ac
<host gdb> set sysroot <targetfs_path>
<host gdb> target remote 10.0.0.3:10000
<host gdb> continue
<host> cntrl-C
We do not get the library's symbols here. But with cat
/proc/{x_pid}/maps we can see the library is loaded in memory.
2) But with the following steps, the libraries get loaded
<target> /usr/bin/X -ac &
<target> gdbserver :10000 --attach <X_pid>
<host gdb> set sysroot <targetfs_path>
<host gdb> target remote 10.0.0.3:10000
We can see the library's symbols and hit breakpoint, debug etc. etc.
Architecture - ARM cortex-a9
toolchain - codesourcery arm-none-linux-gnueabi
gdb version - 7.1.50 (almost the latest!)
The library built with -g2 -ggdb and is not stripped.
Any reason for the first method to not load the symbols? What part of
gdb code should I dig into for this?
Regards,
Karthik
next reply other threads:[~2010-06-24 18:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-24 18:12 karthikeyan.s [this message]
2010-06-25 12:47 ` Matthew Gretton-Dann
2010-06-25 15:18 ` karthikeyan.s
2010-07-01 5:02 ` karthikeyan.s
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=AANLkTil7rQGoNWEmTUk1fx_C17SpH0EOGf8XNBynAtc9@mail.gmail.com \
--to=informkarthik@gmail.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