public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* RE: Determining base address of shared library from core file
@ 2004-07-26 21:15 Bloch, Jack
  2004-07-27 22:06 ` Kevin Buettner
  0 siblings, 1 reply; 10+ messages in thread
From: Bloch, Jack @ 2004-07-26 21:15 UTC (permalink / raw)
  To: 'Kevin Buettner'; +Cc: gdb

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-08-11 22:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-26 21:15 Determining base address of shared library from core file Bloch, Jack
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

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).