Reading zeros from mmap'ed memory while debugging
Hello,
I have encountered something that appears a little strange. Background:
- Dell desktop running Red Hat Linux 8.0, KDE desktop/gui
- I have an application and PCI driver (not written by me) that
o does first open PCI driver and mmap 16K, shared
o zeros 16K memory array used for second open & mmap
o does second open PCI driver and mmap 16K, shared & fixed
- Attempting to debug application using ddd and gdb
- Logic analyzer connected to PCI bus to trace all reads and writes to PCI card
Observation:
- Reads and writes to addresses from first mmap
o data written to mmap address goes out to PCI
o data reads from mmap address cause PCI read
to occur (with valid data), returns data
read from PCI to application
- Reads and writes to addresses from second mmap
o data written to mmap address goes out to PCI
o data reads from mmap address cause PCI read
to occur (with valid data), but zeros are returned to the application as value read
Questions:
- Is this the expected behavior?
- If so, why?
- If not, any thoughts on what is going wrong?
Much thanks,
Dan
Signature · 12 lines
============================================= DanD [email protected] Senior Engineer Work Experience: Windows & Linux "We live in an imperfect world" ============================================= -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>