From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8935 invoked by alias); 9 Jun 2008 22:32:17 -0000 Received: (qmail 8927 invoked by uid 22791); 9 Jun 2008 22:32:16 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 09 Jun 2008 22:31:59 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id D09CC3C1EB; Mon, 9 Jun 2008 15:31:57 -0700 (PDT) Subject: Re: How can I get a memory map out of a core file? From: Michael Snyder To: luisgpm@linux.vnet.ibm.com Cc: Daniel Jacobowitz , Bruce Korb , Andreas Schwab , gdb@sourceware.org, Eli Zaretskii In-Reply-To: <1213028867.10042.101.camel@gargoyle> References: <668c430c0806061345m3c480d95nac5d19b02998715c@mail.gmail.com> <484AD008.8845E46E@dessent.net> <200806071301.09679.Bruce.Korb@gmail.com> <1213023726.10042.78.camel@gargoyle> <20080609152340.GA21379@caradoc.them.org> <1213025441.10042.79.camel@gargoyle> <20080609153944.GA22846@caradoc.them.org> <1213028867.10042.101.camel@gargoyle> Content-Type: text/plain Date: Mon, 09 Jun 2008 22:32:00 -0000 Message-Id: <1213050717.3601.466.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00066.txt.bz2 On Mon, 2008-06-09 at 13:27 -0300, Luis Machado wrote: > On Mon, 2008-06-09 at 11:39 -0400, Daniel Jacobowitz wrote: > > On Mon, Jun 09, 2008 at 12:30:41PM -0300, Luis Machado wrote: > > > The idea is to extend the functionality we have for live processes to > > > core files. > > > > Oh, so you mean the names of files backing each segment? > > Yes. Mainly giving the user the option to show exactly what we had > in /proc//maps right before the crash, so we know where things were > in memory, like the heap, stack and some specific shared libraries' > mappings. > > We currently can't do that. There's some information in the program > headers from a core file, like the one below, that show us a bit of > mapping-related information, but not enough so we can actually track > them down to a shared library. > > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align > LOAD 0x001000 0x00100000 0x00000000 0x00000 0x03000 R E 0x1000 > LOAD 0x001000 0x0fe8b000 0x00000000 0x00000 0x14d000 R E 0x1000 > LOAD 0x001000 0x0ffd8000 0x00000000 0x00000 0x0f000 0x1000 > > Providing such functionality, though, requires re-working the core > file's format, possibly leading to incompatibilities with old formats. > But it could be worth it for the additional information. Could you put the extra info into a ".note" section, ie. something that adds to but does not otherwise change that which is already there?