Bug 149092 - Traditional memory rendering: Default endianness should be retrieved from debugger
Summary: Traditional memory rendering: Default endianness should be retrieved from deb...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: DD (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ted Williams CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 158592 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-28 18:49 EDT by Warren Paul CLA
Modified: 2010-10-14 15:21 EDT (History)
4 users (show)

See Also:


Attachments
modified MemoryRenderingTraditional.java (+committed, +logged) (123.56 KB, patch)
2006-07-12 10:07 EDT, Warren Paul CLA
pawel.1.piech: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Warren Paul CLA 2006-06-28 18:49:26 EDT
Default endianness should be retrieved from debugger.  It's currently set to big endian but for products with little endian targets that's not very friendly.  The user would have to go set it to LE each time he opens a rendering.  It should be able to query the target somehow to get the default.
Comment 1 Warren Paul CLA 2006-07-12 10:07:01 EDT
Created attachment 46168 [details]
modified MemoryRenderingTraditional.java (+committed, +logged)
Comment 2 Warren Paul CLA 2006-07-12 10:07:21 EDT
It's actually worse that than because swapping is done on the memory if in LE mode.  If the memory is LE then it's returned in LE so in the traditional memory rendering if you select LE mode is actually displays it in BE.

I've fixed this along with a few other issues, mostly with caching.  I'm attaching the entire source file rather than a patch.
Comment 3 Alain Lee CLA 2006-09-26 17:38:25 EDT
*** Bug 158592 has been marked as a duplicate of this bug. ***
Comment 4 Ted Williams CLA 2006-12-11 00:10:23 EST
Patch accepted, committed. Thank you.
Comment 5 Alain Lee CLA 2006-12-15 16:24:33 EST
The fix still does not correctly figure out the endianess of the hardware. I have a Big Endian hardware connected. Hex Rendering shows that it is big endian but Traditional Rendering still shows Little Endian. I noticed populateCache() creates MemoryByte with the byteFlags (i.e. ENDIANESS_KNOWN and Little Endian) but the byteFlags was never updated to reflect the correct endianess of the hardware.
Comment 6 Warren Paul CLA 2006-12-15 16:42:15 EST
The debugger implementation needs to make sure it sets the endianness for the memory in question.  See MemoryByte#isEndianessKnown and MemoryByte#bytesAreLittleEndian.
Comment 7 Alain Lee CLA 2006-12-15 16:56:03 EST
I believe the line “cachedBytes[i] = new MemoryByte(readBytes[i].getValue());” in populateCache() should be changed as follows:
 
cachedBytes[i] = new MemoryByte(readBytes[i].getValue(), readBytes[i].getFlags() );

readBytes[] already have byteFlags set correctly
 
Comment 8 Ted Williams CLA 2007-02-05 00:08:45 EST
Alain, I have committed your patch from comment #7.
Comment 9 Pawel Piech CLA 2007-05-29 19:05:27 EDT
Setting "Target Milestone" for report generation.