From: mathieu lacage <Mathieu.Lacage@sophia.inria.fr>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sourceware.org
Subject: Re: gdb and dynamic loader namespaces
Date: Tue, 20 Mar 2007 13:59:00 -0000 [thread overview]
Message-ID: <1174399155.2558.28.camel@mathieu> (raw)
In-Reply-To: <20070109134113.GA16313@nevyn.them.org>
[answer to an old email]
On Tue, 2007-01-09 at 08:41 -0500, Daniel Jacobowitz wrote:
> On Tue, Jan 09, 2007 at 08:57:08AM +0100, Mathieu Lacage wrote:
> > The question then is how can we get access to the link_map of each
> > namespace from the parent process ? We could perform a lookup for the
> > rtld_global data structure and then, use an offset from there to get the
> > required data. I suspect you won't be thrilled by that though. Do you
> > have any better idea ? Maybe I should ask this question on a glibc ML: I
> > would be surprised if no one had ever planned debugger support for this
> > feature.
>
> It may require updating the public members of struct r_debug (and its
> version number). I would recommend not digging around in rtld_global,
> at least not without talking to the glibc developers first; it's prone
> to changing layout between versions. You could see what Solaris does,
> if it's in their documentation.
It is in their documentation. As far as I can tell, they use the rtld_db
API (see chapter 6 of the "Linker and Libraries Guide") to access the
underlying data structures. They even provide a version of rtld_db which
works on linux except that it has been hardcoded to deal with only the
main namespace on linux. Being able to fully implement the library would
require intimate access to the glibc data structures. So, I suspect that
the implementation challenge would be:
- push a rtld_db library in glibc
- add rtld_db support to gdb
regards,
Mathieu
prev parent reply other threads:[~2007-03-20 13:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-08 15:11 Mathieu Lacage
2007-01-08 15:15 ` Daniel Jacobowitz
2007-01-08 16:45 ` mathieu lacage
2007-01-08 17:57 ` Daniel Jacobowitz
2007-01-09 7:58 ` Mathieu Lacage
2007-01-09 13:41 ` Daniel Jacobowitz
2007-03-20 13:59 ` mathieu lacage [this message]
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=1174399155.2558.28.camel@mathieu \
--to=mathieu.lacage@sophia.inria.fr \
--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