Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: ineya ineya <ineyaa@gmail.com>
To: gdb@sourceware.org
Subject: reconstructing process memory map from core
Date: Tue, 09 Feb 2010 22:00:00 -0000	[thread overview]
Message-ID: <7b8592a1002091400y5b901e90s8cb26f75c057ffab@mail.gmail.com> (raw)

How is symbol loading handled when shared libraries come to play?

This is my story:
I have a mips embedded device, which has little memory. So I decided
to dump the heap as the last thing, so in case there is little space
left on device, I would get at least stack, .got, etc. from binary and
shared libraries, and heap would be incomplete. I thought, that having
stack, .got, .dynsym, etc. would be enough for gdb to load symbols
from all binaries and shared libraries, and I could at least resolve
symbols from registers or stack.

But it doesn't work, gdb is trying to read something from heap, and if
this fails, no symbols are loaded. So I was wondering why gdb needs to
access heap? Or more generally how are symbols loaded / how is the
process memory map reconstructed from core file?

I thought all that is needed is to have:
- list of external function - in .dynsym I guess
- .got from runtime
and the address where shared library was in memory is computed by data
present in .got and relative position of function in .so.

Thank you for any hints.


             reply	other threads:[~2010-02-09 22:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-09 22:00 ineya ineya [this message]
2010-02-09 22:08 ` Daniel Jacobowitz
2010-02-10  7:06   ` ineya ineya
2010-02-10  2:41 ` Hui Zhu

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=7b8592a1002091400y5b901e90s8cb26f75c057ffab@mail.gmail.com \
    --to=ineyaa@gmail.com \
    --cc=gdb@sourceware.org \
    /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