Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Honor endianess on group level #88

Closed
jreineckearm opened this issue Mar 1, 2024 · 0 comments · Fixed by #93
Closed

Honor endianess on group level #88

jreineckearm opened this issue Mar 1, 2024 · 0 comments · Fixed by #93
Assignees
Labels
bug Something isn't working

Comments

@jreineckearm
Copy link
Contributor

jreineckearm commented Mar 1, 2024

Description

The Memory Inspector internals do already have provisions to consider endianess in the display:

However, the corresponding property isn't honored yet for rendering. It should be on word group level of the display. At the moment, words groups appear to be displayed as big endian while the internal default is little endian.
UPDATE (06/03/24): After further discussion between @martin-fleck-at and @jreineckearm , we agreed to change the scope for applying the endianess from word to group. The rational behind this was:

  • The display contents is formatted to introduce spaces between groups, not words. Applying endianess on a word level would have been confusing because it would be hard to see when a new word starts. It is better to show groups in a consistent endianess scheme. To replicate a word endianess, the user can configure the display to use 1 word group.
  • This way the user would have the ability to control on which granularity the endianess transformation happens. This can be interesting if for example working with memory-mapped buffers for a peripherals where the consumed endianess differs from the CPU word endianess.

How to reproduce:

  • Start a debug session and open a memory window for a variable with a type > 1 Byte. For example with Arm Debugger and an M-class CPU. Most implementations are little endian.
  • Make sure the word setting matches the type's size. And words per group is set to 1.
  • Compare the hex value in the variables window and the displayed word in the Memory Inspector. Cheating a little below as the variable is shown in decimal representation: 25000000 (decimal) = 0x017D7840

image

  • An additional test is to look at larger group setting and toggle between little and big endianess to verify the byte-order is correctly swapped.

Expected behavior

Expectation is that endianess is honored on word group level.

Environment

  • OS: Windows 10 Enterprise
  • Browser: N/A
  • Theia or VS Code Version: VS Code 1.86.2

Additional information

@jreineckearm jreineckearm added the bug Something isn't working label Mar 1, 2024
@martin-fleck-at martin-fleck-at self-assigned this Mar 1, 2024
martin-fleck-at added a commit to eclipsesource/vscode-memory-inspector that referenced this issue Mar 5, 2024
- Move Endianness interface into common code
- Add setting for 'Endianness' in package.json
- Add option for 'Endianness' in options panel
- Assume DAP as big endian and revert byte-order for little endian
- Set 'Little Endian' as default as it may be more common

Closes eclipse-cdt-cloud#88
martin-fleck-at added a commit to eclipsesource/vscode-memory-inspector that referenced this issue Mar 6, 2024
- Move Endianness interface into common code
- Add setting for 'Endianness' in package.json
- Add option for 'Endianness' in options panel
- Assume DAP as big endian and revert byte-order for little endian
- Set 'Little Endian' as default as it may be more common

Closes eclipse-cdt-cloud#88
@jreineckearm jreineckearm changed the title Honor endianess on word level Honor endianess on ~~word~~ group level Mar 6, 2024
@jreineckearm jreineckearm changed the title Honor endianess on ~~word~~ group level Honor endianess on group level Mar 6, 2024
martin-fleck-at added a commit to eclipsesource/vscode-memory-inspector that referenced this issue Mar 7, 2024
- Move Endianness interface into common code
- Add setting for 'Endianness' in package.json
- Add option for 'Endianness' in options panel
- Assume DAP as big endian and revert byte-order for little endian
- Set 'Little Endian' as default as it may be more common

Closes eclipse-cdt-cloud#88
martin-fleck-at added a commit to eclipsesource/vscode-memory-inspector that referenced this issue Mar 8, 2024
- Move Endianness interface into common code
- Add setting for 'Endianness' in package.json
- Add option for 'Endianness' in options panel
- Assume DAP as big endian and revert byte-order for little endian
- Set 'Little Endian' as default as it may be more common

Closes eclipse-cdt-cloud#88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants