From: Luis Machado <luisgpm@linux.vnet.ibm.com>
To: Bruce Korb <bruce.korb@gmail.com>
Cc: Andreas Schwab <schwab@suse.de>,
gdb@sourceware.org, Eli Zaretskii <eliz@gnu.org>,
Michael Snyder <msnyder@specifix.com>
Subject: Re: How can I get a memory map out of a core file?
Date: Mon, 09 Jun 2008 15:04:00 -0000 [thread overview]
Message-ID: <1213023726.10042.78.camel@gargoyle> (raw)
In-Reply-To: <200806071301.09679.Bruce.Korb@gmail.com>
On Sat, 2008-06-07 at 13:01 -0700, Bruce Korb wrote:
> On Saturday 07 June 2008 11:28:55 am Andreas Schwab wrote:
> > Brian Dessent <brian@dessent.net> writes:
> >
> > > Local core dump file:
> > > `/home/brian/core', file type elf32-i386.
> > > 0x08054000 - 0x08055000 is load2
> > > 0x08055000 - 0x08058000 is load3
> > > 0x40016000 - 0x40017000 is load5
> > > 0xbffff000 - 0xc0000000 is load6
> > > 0xffffe000 - 0xfffff000 is load7
> > >
> > > Though I suppose those section names are not really all that useful,
> >
> > Those are not sections (a corefile does not contain any sections), but
> > segments (which are unnamed).
>
> And are what I was looking for. "info target" just wasn't jumping out as
> the way to get the list of mapped data. The list is a little weird with
> zero length sections, but I can tell what's mapped now. Thank you!!
>
> Perhaps put "memory map" in the index and point to
> "info target"? I went for that phrase due to the well-known "pmap":
> NAME
> pmap - display information about process memory mappings
>
> SYNOPSIS
> pmap [ -d | -q | -h | -V ] pid
>
> DESCRIPTION
> pmap(1) displays information about a process's memory mappings, such as
> its stack, data segment, mapped files, and so on.
>
> Thank you for your help! Regards, Bruce
This is, indeed, a limitation we have right now. Memory mapping
information is only available for a live process through
the /proc/<pid>/maps entry.
When a core dump is created, this information is read entirely, by GDB,
in order to create the various LOAD segments we have in the core file.
Even the names of the mappings are read by GDB, but it's unfortunately
discarded.
We're left with what can be seen with "maint info sections", but the
lack of descriptive names is really bad for precise analysis of the
mappings.
In order for this information to be readily available through a core
file, enhancements need to be done in the kernel itself.
So, now that we've touched this topic, what do you think about this? For
debugging purposes, this would be valuable information to have in GDB.
Best regards,
Luis
next prev parent reply other threads:[~2008-06-09 15:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 20:46 Bruce Korb
2008-06-06 21:54 ` Michael Snyder
2008-06-07 6:30 ` Eli Zaretskii
2008-06-07 16:31 ` Bruce Korb
2008-06-07 16:58 ` Eli Zaretskii
2008-06-07 18:14 ` Brian Dessent
2008-06-07 18:29 ` Andreas Schwab
2008-06-07 20:01 ` Bruce Korb
2008-06-09 15:04 ` Luis Machado [this message]
2008-06-09 15:24 ` Daniel Jacobowitz
2008-06-09 15:32 ` Luis Machado
2008-06-09 15:40 ` Daniel Jacobowitz
2008-06-09 16:28 ` Luis Machado
2008-06-09 17:52 ` Ulrich Weigand
2008-06-09 18:03 ` Luis Machado
2008-06-12 13:58 ` Ulrich Weigand
2008-06-12 14:18 ` Luis Machado
2008-06-12 14:30 ` Ulrich Weigand
2008-06-09 22:32 ` Michael Snyder
2008-06-09 15:37 ` Bruce Korb
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=1213023726.10042.78.camel@gargoyle \
--to=luisgpm@linux.vnet.ibm.com \
--cc=bruce.korb@gmail.com \
--cc=eliz@gnu.org \
--cc=gdb@sourceware.org \
--cc=msnyder@specifix.com \
--cc=schwab@suse.de \
/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