ImHex
ImHex copied to clipboard
[Bug] Search in Hex editor doesn't seem to be working if you change base address
Operating System
Linux
What's the issue you encountered?
If you just load file and do "search" (Ctrl+F) in the hex editor, it works.
Once you change base address - either via Hex editor context menu "Set base address" or using #pragma base_address 0x800FF00
in pattern, it can't find any byte.
Resetting base address back to 0x0
makes search work again.
How can the issue be reproduced?
- Open file - I'm using for example this Cortex-M image file but it doesn't seem to depend on file
- Change base address to
0x800FF00
(either via context menu in Hex Editor or#pragma base_address 0x800FF00
in pattern) - Search for
5A
hex character (third byte from start), or any other - doesn't work - Reset base address to
0x0
- Search for the same byte again - it works after base address reset
ImHex Version
1.24.3
ImHex Build Type
- [ ] Nightly or built from sources
Additional context?
If you also want to test with patterns, here are patterns I'm developing - https://github.com/trezor/trezor-firmware/tree/master/legacy/imhex . The sample file goes together with t1_firmware_v1+v2.hexpat pattern (it's 2 linear structs and Cortex-M VTOR).
Possibly the base address change has also effect on disassembly, using "entire range" instead of "selection" after base address change seems to take very long (need to cancel it before it runs overly long, but without base address change is basically instantly completed).
Nevertheless, ImHex is amazing tool, thanks for that!