From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: khilman@equator.com Cc: gdb@sourceware.cygnus.com Subject: Re: examining mmap()'d memory regions on linux Date: Wed, 17 May 2000 14:55:00 -0000 Message-id: <200005172155.e4HLtL412952@delius.kettenis.local> References: X-SW-Source: 2000-05/msg00082.html From: Kevin Hilman 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