public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Jim Blandy <jimb@red-bean.com>
Cc: Patrick Alken <patrick.alken@colorado.edu>, gdb@sourceware.org
Subject: Re: gdb and shared libraries
Date: Thu, 09 Feb 2006 13:51:00 -0000	[thread overview]
Message-ID: <20060209135144.GA23355@nevyn.them.org> (raw)
In-Reply-To: <8f2776cb0602082154q7613a808ha4cff5fa6bbf382b@mail.gmail.com>

On Wed, Feb 08, 2006 at 09:54:35PM -0800, Jim Blandy wrote:
> On 2/8/06, Patrick Alken <patrick.alken@colorado.edu> wrote:
> > So it is step #4 that I am hoping someone on the list can give me
> > details for. How do you know when all the libraries have been loaded
> > so that you can stop execution of the program while you load
> > the libs symbol tables? How do you get the pathnames of the libraries
> > after they have been loaded so you can mmap them?
> 
> Well, each time it loads a shared library, the dynamic linker calls a
> specific function (I think it's _dl_debug_state on Linux), and there
> is a designated data structure for you to walk to find the current
> list of shlibs.  See solib.c and solib-svr4.c.
> 
> But I can't remember, nor can I Google, where this stuff is
> documented.  I guess we're just depending on undocumented behavior (on
> Linux, at least).  But the whole reason it's there is to help out the
> debugger, so I don't know why it'd be undocumented.

Well, that's how _we_ do it.  How you're really _supposed_ to do it is
unclear, but involves the dynamic DT_DEBUG tag.

-- 
Daniel Jacobowitz
CodeSourcery

  reply	other threads:[~2006-02-09 13:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-08 21:13 Patrick Alken
2006-02-09  5:54 ` Jim Blandy
2006-02-09 13:51   ` Daniel Jacobowitz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-01-06 22:07 GDB and Shared Libraries Drummonds, Scott B
2004-01-06 22:10 ` Daniel Jacobowitz
2003-07-24 21:51 gdb and shared libraries wim delvaux
     [not found] <3A84136A.23BAF90F@home.com>
     [not found] ` <1010209182220.ZM4621@localhost.localdomain>
     [not found]   ` <3A845A56.5EF8F61@home.com>
     [not found]     ` <3A9AB471.5F46554@home.com>
     [not found]       ` <1010226205415.ZM30678@localhost.localdomain>
2001-02-26 14:50         ` GDB and shared libraries (was Re: Are you still with Suse) Stephen Smith
2001-02-26 15:35           ` GDB and shared libraries Kevin Buettner
2001-02-26 16:07             ` Stephen Smith
2001-02-26 16:39             ` Stephen Smith
2001-02-26 18:05               ` Kevin Buettner
2001-02-26 20:51             ` Stephen Smith
     [not found]             ` <3A9B0022.16ABBBE0@home.com>
     [not found]               ` <1010227013252.ZM13444@ocotillo.lan>
2001-02-26 21:05                 ` Stephen Smith
2001-02-26 23:10                   ` Kevin Buettner
2001-02-27  7:37                     ` Stephen Smith
2001-02-27  8:14                   ` Andrew Cagney
2001-02-27 13:14                     ` Stephen Smith
2001-02-27 13:44                       ` Kevin Buettner
2001-02-27 14:04                         ` Stephen Smith
2001-03-21 15:59                     ` Stephen Smith

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=20060209135144.GA23355@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=jimb@red-bean.com \
    --cc=patrick.alken@colorado.edu \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).