Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347845

Summary: Updating readable/writable flags of changed memory bytes
Product: [Tools] CDT Reporter: Tomas Martinec <fyzmat>
Component: cdt-debug-dsf-gdbAssignee: Project Inbox <cdt-debug-dsf-gdb-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, pawel.1.piech
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Source for reproducing the behaviour
none
Proposed fix none

Description Tomas Martinec CLA 2011-05-31 14:50:11 EDT
Build Identifier: I20110519-1138

Hello,

probably I have found a problem with the current way of reading and displaying memory content. It happens when a block of memory is unreadable and after some time it changes to readability (for example because of page mapping/unmapping). The memory view then displays (red) question marks instead of proper contents of memory.

Reproducible: Always

Steps to Reproduce:
1. Create a C project; (Hello world ANSI C project)
2. Use the attached source code (requires work on the linux plaform; my kernel is 2.6.32.15)
3. Put breakpoints on the first and the last lines of the main function and start debugging
4. When the first breakpoint is hit, open memory view and add a hex monitor for the address 0x100000 - you should see just gray question marks, which is correct
5. Resume the program
6. When the second breakpoint is hit, see the memory view; you will see a few red question marks and the rest of gray question marks (it depend on the default content of mapped memory; zero bytes are gray, because their value has not changed for CDT); anyway there should not be any question mark at all
Comment 1 Tomas Martinec CLA 2011-05-31 14:51:25 EDT
Created attachment 197029 [details]
Source for reproducing the behaviour
Comment 2 Tomas Martinec CLA 2011-05-31 14:52:08 EDT
Created attachment 197031 [details]
Proposed fix