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?


Bruce Korb wrote:

> was attempted.  So, for me, the ideal solution is a command that yields
> (figures out) the valid address ranges, and an adequate backup would

Doesn't "info target" do this?

$ ulimit -c 10000; top & kill -ABRT $! && fg %1
[1] 2347
top
Aborted (core dumped)

$ gdb -batch -x <(echo 'info target') -c core
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
Core was generated by `top'.
Program terminated with signal 6, Aborted.
#0  0x40000c20 in ?? ()
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, but
in conjunction with the executable it should be possible to reverse
engineer which library / executable each corresponds to.

Brian


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