From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13665 invoked by alias); 9 Jun 2008 16:28:21 -0000 Received: (qmail 13652 invoked by uid 22791); 9 Jun 2008 16:28:20 -0000 X-Spam-Check-By: sourceware.org Received: from igw1.br.ibm.com (HELO igw1.br.ibm.com) (32.104.18.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 09 Jun 2008 16:27:57 +0000 Received: from mailhub3.br.ibm.com (mailhub3 [9.18.232.110]) by igw1.br.ibm.com (Postfix) with ESMTP id 3235632C09D for ; Mon, 9 Jun 2008 13:02:30 -0300 (BRST) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.18.232.47]) by mailhub3.br.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m59GRsfx1052720 for ; Mon, 9 Jun 2008 13:27:54 -0300 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m59GRnbo006430 for ; Mon, 9 Jun 2008 13:27:50 -0300 Received: from [9.8.3.207] ([9.8.3.207]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m59GRmtN006406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Jun 2008 13:27:49 -0300 Subject: Re: How can I get a memory map out of a core file? From: Luis Machado Reply-To: luisgpm@linux.vnet.ibm.com To: Daniel Jacobowitz Cc: Bruce Korb , Andreas Schwab , gdb@sourceware.org, Eli Zaretskii , Michael Snyder In-Reply-To: <20080609153944.GA22846@caradoc.them.org> 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> Content-Type: text/plain Date: Mon, 09 Jun 2008 16:28:00 -0000 Message-Id: <1213028867.10042.101.camel@gargoyle> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 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/msg00056.txt.bz2 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. Luis