Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Bloch, Jack" <jack.bloch@siemens.com>
To: "'Kevin Buettner'" <kevinb@redhat.com>
Cc: gdb@sources.redhat.com
Subject: RE: Determining base address of shared library from core file
Date: Mon, 26 Jul 2004 21:15:00 -0000	[thread overview]
Message-ID: <7A25937D23A1E64C8E93CB4A50509C2A0310F2CC@stca204a.bus.sc.rolm.com> (raw)

BTW, if I run readelf -d on my executable, it show a debug segment with a
0x0. I don't have to load the executable into memory somehow do I? 

-----Original Message-----
From: Kevin Buettner [mailto:kevinb@redhat.com]
Sent: Wednesday, July 21, 2004 1:53 PM
To: Bloch, Jack
Cc: gdb@sources.redhat.com
Subject: Re: Determining base address of shared library from core file


On Mon, 19 Jul 2004 07:51:31 -0700
"Bloch, Jack" <Jack.Bloch@icn.siemens.com> wrote:

> Is there an easy way to determine the base address of a shared library
from
> a core file?

It depends upon what you mean by "easy".

For an SVR4-like system (which includes Linux), you have to traverse
the dynamic section to find the address of the r_debug struct.  Once
that is done, you still have to traverse the link_map structs to find
the desired address.  See solib-svr4.c for the gory details.

(IMO, this isn't very easy.)

Kevin


             reply	other threads:[~2004-07-26 21:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-26 21:15 Bloch, Jack [this message]
2004-07-27 22:06 ` Kevin Buettner
2004-08-11  0:02   ` internal-error: arm_elf_osabi_sniffer Nagender Telkar
2004-08-11  7:38     ` Monika Chaddha
2004-08-11 20:45       ` Nagender Telkar
2004-08-11 21:45         ` Richard Earnshaw
2004-08-11 21:50           ` Nagender Telkar
2004-08-11 21:54             ` Richard Earnshaw
2004-08-11 22:19               ` Nagender Telkar
2004-08-11 22:32                 ` Richard Earnshaw
  -- strict thread matches above, loose matches on Subject: below --
2004-07-26 19:33 Determining base address of shared library from core file Bloch, Jack
2004-07-26 21:09 ` Kevin Buettner
2004-07-19 18:28 Bloch, Jack
2004-07-21 17:58 ` Kevin Buettner

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=7A25937D23A1E64C8E93CB4A50509C2A0310F2CC@stca204a.bus.sc.rolm.com \
    --to=jack.bloch@siemens.com \
    --cc=gdb@sources.redhat.com \
    --cc=kevinb@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