The disassembler plugin will always disassemble bytes in little endian format even if the big endian option is selected.
In view_disassembler.cpp, the endianness choice is stored in the littleEndian variable:
// Draw endian radio buttons. This setting is available for all architectures
static int littleEndian = true;
ImGui::RadioButton("hex.ui.common.little_endian"_lang, &littleEndian, true);
ImGui::SameLine();
ImGui::RadioButton("hex.ui.common.big_endian"_lang, &littleEndian, false);
but the littleEndian variable is never referenced when setting m_mode
How can the issue be reproduced?
Create new file
Enter the following bytes: 3C 03 80 00
Disassemble using the MIPS64 mode
These bytes should be disassembled as lui $v1, 0x8000 in big endian format, but they get disassembled to raw bytes regardless of if big endian or little endian is selected
Enter the following bytes: 00 80 03 3C
Disassemble using the MIPS64 mode
These bytes will now disassemble to lui $v1, 0x8000 regardless of if big endian or little endian is selected
Operating System
Windows
What's the issue you encountered?
The disassembler plugin will always disassemble bytes in little endian format even if the big endian option is selected.
In
view_disassembler.cpp
, the endianness choice is stored in thelittleEndian
variable:but the
littleEndian
variable is never referenced when settingm_mode
How can the issue be reproduced?
3C 03 80 00
These bytes should be disassembled as
lui $v1, 0x8000
in big endian format, but they get disassembled to raw bytes regardless of if big endian or little endian is selected00 80 03 3C
These bytes will now disassemble to
lui $v1, 0x8000
regardless of if big endian or little endian is selectedImHex Version
1.34.0
ImHex Build Type
Installation type
MSI
Additional context?
No response