Community
Participate
Working Groups
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.
Created attachment 46168 [details] modified MemoryRenderingTraditional.java (+committed, +logged)
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.
*** Bug 158592 has been marked as a duplicate of this bug. ***
Patch accepted, committed. Thank you.
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.
The debugger implementation needs to make sure it sets the endianness for the memory in question. See MemoryByte#isEndianessKnown and MemoryByte#bytesAreLittleEndian.
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
Alain, I have committed your patch from comment #7.
Setting "Target Milestone" for report generation.