mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-07 09:11:15 -09:00
SwitchOverride.java is one of the recommended ways to fix switch statements in the decompiler when there are too many branches (GhidraDocs/GhidraClass/Advanced/improvingDisassemblyAndDecompilation) Currently the indirect jump is only allowed to be an unconditional computed jump (or a call). However, compilers can sometimes implement switch statements using conditional indirect jumps (via conditional loads, conditional adds, etc.) if the target architecture supports them (e.g., ARM). In this case, SwitchOverride.java will fail because the instruction flow type will be RefType.CONDITIONAL_COMPUTED_JUMP rather than the expected RefType.COMPUTED_JUMP, even though both should be equally acceptable.
4.7 KiB
4.7 KiB