This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How can I get a memory map out of a core file?


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/<pid>/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?




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]