This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: examining mmap()'d memory regions on linux
- To: Kevin Hilman <khilman at equator dot com>
- Subject: Re: examining mmap()'d memory regions on linux
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 18 May 2000 09:32:33 +1000
- CC: gdb at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <r23dngrjg9.fsf@bobdog.equator.com>
Kevin Hilman wrote:
>
> I have an app that reads/writes to an mmap()'d region. The data
> is being read and written fine because it's getting to it's final
> location (in this case a hardware device).
>
> However, if I try to examine (via 'x') these memory regions in gdb, I
> always get zeros.
>
> Does gdb support mmap()'d regions?
Not a GDB problem. GDB asks the kernel ``can I have memory at address X
with process P''. If the kernel doesn't return it there is little GDB
can do :-)
As a work around, you may want to add a small function to your program
that dumps out the relevant data. You can then call that from the gdb
command line.
enjoy,
Andrew