This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How can I get a memory map out of a core file?
On Friday 06 June 2008 11:29:29 pm Eli Zaretskii wrote:
> > On Fri, 2008-06-06 at 13:45 -0700, Bruce Korb wrote:
> > > Hi,
> > >
> > > "jmap" looked really nice, but that is Solaris only.
> > > "pmap" is almost what I want, but there's no /proc/pid directory
> > > for my core dump any more.
> > > If there is some GDB command I can use, I haven't found it.
> > > I haven't seen any obvious way to emulate it either.
> > > Surely someone, somewhere has solved this problem.
> > > Anyone know where the solution is hiding? :)
> > > Thank you. Regards - Bruce
> >
> > Try "help info proc mappings". It may be the closest we've got
> > to what you want.
>
> How can this help in a core file? The process is already dead, so
> it's not in /proc, right? Or am I missing something?
Hi Eli,
Nope. You're right, Eli. It doesn't help. I tried it. I also tried sourcing
a file that had a series of "x/3x 0xNNN00000" commands at 1 Meg steps.
That didn't work either because GDB quit as soon as an invalid address
was attempted. So, for me, the ideal solution is a command that yields
(figures out) the valid address ranges, and an adequate backup would
be to tell the "source" command to keep going after a failed command.
Perhaps this is a "request for enhancement", though I hoped there might
already be some hackish way of accomplishing what I need.
Thanks! Cheers - Bruce