Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Bäng-ha  " <jpbarda@hotmail.com>
To: gdb@sources.redhat.com
Subject: Map offsets
Date: Sat, 09 Mar 2002 07:52:00 -0000	[thread overview]
Message-ID: <F69OlbpH71yEXUIEAOe0000ee27@hotmail.com> (raw)

Hi!

I'm sure this is a rather stupid question, but I'll ask it anyway:
I'm debugging a couple of processes under linux, and I want to load the 
symbols from glibc. Now, the only way I've managed to figure out as to 
perform the task of finding the base address of libc if to look at the 
memory maps in /proc/?/maps, whence I get the base address of libc to be 
e.g. 0x40020000 (this was for mingetty). So naturally, I do add-symbol-file 
/lib/libc-2.2.2.so 0x4002000, but as it turns, it should be loaded 
0x4003BCB0, i.e. at an offset of 0x1BCB0 from what /proc says. (I got the 
exact offset from looking at the dynamically linked function tables and 
comparing the read function to what was acutally loaded, if that would
somehow matter) Anyway, I guess I could live with this small annoyance, if 
it wasn't for that other libs wants to be loaded with other offsets. 0x1BCB0 
didn't work with e.g. libresolv. And, I want to know the cause of this as 
well, of
course.
So could someone tell me how to get the real offset, because I can't imagine 
that there isn't an error-free way to get the address, right?

Thanks in advance
Fredrik Tolf


_________________________________________________________________
Join the worldÂ’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


             reply	other threads:[~2002-03-09 15:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-09  7:52 Bäng-ha   [this message]
2002-03-09  8:09 ` Daniel Jacobowitz
2002-03-16  7:47 Bäng-ha  
2002-03-16  9:33 ` Daniel Jacobowitz

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=F69OlbpH71yEXUIEAOe0000ee27@hotmail.com \
    --to=jpbarda@hotmail.com \
    --cc=gdb@sources.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