title: Examining mmaped addresses using GDB
body: <p>I'm using the driver I posted at <a href="https://stackoverflow.com/questions/647783/direct-memory-access-in-linux/">Direct Memory Access in Linux</a> to mmap some physical ram into a userspace address. However, I can't use GDB to look at any of the address; i.e., x 0x12345678 (where 0x12345678 is the return value of mmap) fails with an error "Cannot access memory at address 0x12345678".</p>
  
  <p>Is there any way to tell GDB that this memory can be viewed? Alternatively, is there something different I can do in the mmap (either the call or the implementation of foo_mmap there) that will allow it to access this memory?</p>
  
  <p>Note that I'm not asking about /dev/mem (as in the first snippet there) but about a mmap to memory acquired via ioremap(), virt_to_phys() and remap_pfn_range()</p>