Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: examining mmap()'d memory regions on linux
@ 2000-06-05 18:01 j_clifton
  0 siblings, 0 replies; 3+ messages in thread
From: j_clifton @ 2000-06-05 18:01 UTC (permalink / raw)
  To: gdb

>Kevin Hilman wrote on 17 May 2000:
>> 
>> 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

Can you elaborate on what/how the kernel (ptrace) returns zero for mmapped
memory?
I read the ptrace.c code for i386 and didn't see the relationship between the
comments and mmap. I have the same problem with unable to examine a PCI
reflective memory. I also tried a program which just mallocs memory and I
couldn't see it's contents either.


^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <r23dngrjg9.fsf@bobdog.equator.com>]

end of thread, other threads:[~2000-06-05 18:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-05 18:01 examining mmap()'d memory regions on linux j_clifton
     [not found] <r23dngrjg9.fsf@bobdog.equator.com>
2000-05-17 14:55 ` Mark Kettenis
2000-05-17 16:34 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox