From: Daniel Jacobowitz <dmj+@andrew.cmu.edu>
To: Michael Snyder <msnyder@redhat.com>
Cc: gdb-patches@sources.redhat.com, kettenis@science.uva.nl,
kevinb@redhat.com
Subject: Re: [RFA] Find and read symbol files after attach (linux)
Date: Tue, 08 Jan 2002 10:36:00 -0000 [thread overview]
Message-ID: <20020108133130.A27580@nevyn.them.org> (raw)
In-Reply-To: <3C3B332E.774C4E2E@redhat.com>
On Tue, Jan 08, 2002 at 09:58:06AM -0800, Michael Snyder wrote:
> Daniel Jacobowitz wrote:
> >
> > On Mon, Jan 07, 2002 at 04:40:00PM -0800, Michael Snyder wrote:
> > > [oops, hit send too soon...]
> > > This change allows GDB to find and read the symbol files (including
> > > all shared libraries) on Linux when you attach to an anonymous PID.
> > > It should work for all Linuxen, but for now I've only added it to the
> > > linux.mh and nm-linux.h files in config/i386. Please feel free to
> > > add it to your targets.
> >
> > [without actually looking at it...]
> >
> > (A) Is there any reason not to do it for all Linuxen in
> > config/nm-linux.h?
>
> Probably can. I was being conservative.
I'd prefer you to do this, then. I believe it will work.
> > (B) Why do we need /proc to do this? We should be able to use the
> > information in the link map - which we already access in solib-svr4.h -
> > to get all of this.
>
> There may be another method of doing it -- I just used the
> method I know (copied from Solaris). We need to discover
> the mapped memory regions so you can find the "debug_base".
> But this isn't one of my strong areas, so you may well know
> a better way to do the same thing.
Well, Mark's comment is completely correct. Eventually I remembered
that this works by looking up data at _DYNAMIC, which means we need the
executable first :)
I believe that we should be able to find the rest of what we need by
the shared library code, without the mappings file, though. I also
thought that this would just 'work'. Have you tried with the code to
find the executable but without the code to find shared libraries?
What happens?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-01-08 18:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-07 18:20 Michael Snyder
2002-01-07 19:00 ` Daniel Jacobowitz
2002-01-08 10:12 ` Mark Kettenis
[not found] ` <3C3B332E.774C4E2E@redhat.com>
2002-01-08 10:36 ` Daniel Jacobowitz [this message]
2002-01-08 15:15 ` Michael Snyder
2002-01-07 18:20 Michael Snyder
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=20020108133130.A27580@nevyn.them.org \
--to=dmj+@andrew.cmu.edu \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@science.uva.nl \
--cc=kevinb@redhat.com \
--cc=msnyder@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