From: PAUL GILLIAM <pgilliam@us.ibm.com>
To: gdb@sources.redhat.com
Subject: Chicken-or-egg problem with shared libraries
Date: Tue, 23 May 2006 22:59:00 -0000 [thread overview]
Message-ID: <1148418266.315.45.camel@dufur.beaverton.ibm.com> (raw)
In solib-svr4.c (enable_break), GDB tries to set a breakpoint in the
dynamic loader (at "_dl_debug_state") so that shared objects can be
tracked as they are loaded and unloaded.
The problem (on gnu/linux PowerPC64 at least) is that the dynamic loader
is it's self a shared object and its minimal symbols are not loaded when
"enable_break" is called.
I have two ideas for fixing this: 1) pre-load the dynamic loaders
minimal symbols so that when "enable_break()" is called,
"_dl_debug_state" will be found and all is well and 2) allow
"enable_break()" to set a pending breakpoint.
The second idea has the problem of which name to use: "enable_break()"
currently tries five or six.
I like the first idea, but something is nagging the back of my mind
about it, but I don't know what. I think we're talking about less the
20 minimal symbols and the name of the of the dynamic linker is in the
elf section '.interp'. So that sounds straight forward.
Any advice?
-=# Paul #=-
next reply other threads:[~2006-05-23 22:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-23 22:59 PAUL GILLIAM [this message]
2006-05-23 23:02 ` Daniel Jacobowitz
2006-05-23 23:27 ` PAUL GILLIAM
2006-05-23 23:32 ` Daniel Jacobowitz
2006-05-24 1:12 ` PAUL GILLIAM
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=1148418266.315.45.camel@dufur.beaverton.ibm.com \
--to=pgilliam@us.ibm.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