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

Bug 342239

Summary: Traditional memory rendering lacks per byte display granularity for unreadable bytes
Product: [Tools] CDT Reporter: Adrian Gancev <adrian.gancev>
Component: cdt-memoryAssignee: Teodor Madan <teodor.madan>
Status: RESOLVED FIXED QA Contact: Ted Williams <ted>
Severity: minor    
Priority: P3 CC: adrian.gancev, cdtdoug, marc.khouzam, teodor.madan
Version: 8.0Flags: teodor.madan: iplog-
Target Milestone: 8.0   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
proposed fix according with bug description cdtdoug: iplog+

Description Adrian Gancev CLA 2011-04-08 04:21:18 EDT
Build Identifier: 3.7.0

Traditional rendering is not able to display ? only for unreadable bytes. Instead, it displays ? on the entire cell that contain an unreadable byte, hiding bytes that, in fact, were correcly read.

Example:
Read 4 bytes, the 1st byte was unreadable, the rest were read and have all value 0.
Display is hex, big endian, 4 bytes per cell.
Currently displayed:
????????
Must display:
??000000

The fix should enable pe byte display on unreadable bytes for hex and binary radices. These are the only radices which have 1 to N mapping between the read bytes array and chars in the formatted array (1 to 2 for hex, 1 to 8 for binary).


Reproducible: Always

Steps to Reproduce:
1. While debugging, open a traditional memory rendering over a memory area that has isolated unreadable bytes.
2. Choose hex or binary radix.
3. Observe that not only the unreadable bytes are marked with ? but the entire cells to which they belong.
Comment 1 Adrian Gancev CLA 2011-04-08 04:23:06 EDT
Created attachment 192799 [details]
proposed fix according with bug description
Comment 2 Teodor Madan CLA 2011-04-08 09:57:10 EDT
Indeed, traditional rendering behaves differently then platform with regard to how we display a word that is partially readable. Platform Hex rendering is padding only the unreadable byte, while traditional rendering is marking the whole word as readable.
Comment 3 Teodor Madan CLA 2011-04-08 10:01:48 EDT
I have committed the fix with slight change to not try to char convert all unreadable bytes if the whole block/word is unreadable.
Comment 4 CDT Genie CLA 2011-04-08 10:23:05 EDT
*** cdt cvs genie on behalf of tmadan ***
Bug 342239 - Traditional memory rendering lacks per byte display granularity for unreadable bytes

[*] Rendering.java 1.19 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java?root=Tools_Project&r1=1.18&r2=1.19