This is the mail archive of the gdb@sourceware.cygnus.com 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]

Re: examining mmap()'d memory regions on linux


   From: Kevin Hilman <khilman@equator.com>
   Date: 17 May 2000 13:49:10 -0700

   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?

Sure.  However, since you mention a hardware device, you're probably
trying to examine memory mapped from that device.  The Linux kernel
prevents GDB from reading "non-kernel-mapped video buffers and
similar" (see arch/i386/kernel/ptrace.c in the Linux source tree), and
will return all zeroes instead.  Probably because reading from such
memory often has side-effects.

Nothing we can do about that in GDB!

Mark



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