diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2022-02-04 22:04:52 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2022-06-22 17:38:21 -0400 |
| commit | da250551336d916ad0058bf200e1f0b29ccb2a8f (patch) | |
| tree | ce0bd66003e2eda8f3b8ebc63bc623d265410df5 /python/highlevelil.py | |
| parent | 63e72efd13b31c1d2061b978e2a5f4688e7ba4fd (diff) | |
Add unreachable instruction for switch statements with an unreachable default
Diffstat (limited to 'python/highlevelil.py')
| -rw-r--r-- | python/highlevelil.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/highlevelil.py b/python/highlevelil.py index 942330bf..395de637 100644 --- a/python/highlevelil.py +++ b/python/highlevelil.py @@ -159,6 +159,7 @@ class HighLevelILInstruction(BaseILInstruction): HighLevelILOperation.HLIL_BREAK: [], HighLevelILOperation.HLIL_CONTINUE: [], HighLevelILOperation.HLIL_JUMP: [ ("dest", "expr") ], HighLevelILOperation.HLIL_RET: [("src", "expr_list")], HighLevelILOperation.HLIL_NORET: [], + HighLevelILOperation.HLIL_UNREACHABLE: [], HighLevelILOperation.HLIL_GOTO: [("target", "label")], HighLevelILOperation.HLIL_LABEL: [ ("target", "label") ], HighLevelILOperation.HLIL_VAR_DECLARE: [("var", "var")], HighLevelILOperation.HLIL_VAR_INIT: [ @@ -1017,6 +1018,11 @@ class HighLevelILNoret(HighLevelILInstruction, Terminal): @dataclass(frozen=True, repr=False, eq=False) +class HighLevelILUnreachable(HighLevelILInstruction, Terminal): + pass + + +@dataclass(frozen=True, repr=False, eq=False) class HighLevelILGoto(HighLevelILInstruction, Terminal): @property def target(self) -> GotoLabel: @@ -1937,6 +1943,7 @@ ILInstruction = { HighLevelILOperation.HLIL_JUMP: HighLevelILJump, # ("dest", "expr"), HighLevelILOperation.HLIL_RET: HighLevelILRet, # ("src", "expr_list"), HighLevelILOperation.HLIL_NORET: HighLevelILNoret, # , + HighLevelILOperation.HLIL_UNREACHABLE: HighLevelILUnreachable, # , HighLevelILOperation.HLIL_GOTO: HighLevelILGoto, # ("target", "label"), HighLevelILOperation.HLIL_LABEL: HighLevelILLabel, # ("target", "label"), HighLevelILOperation.HLIL_VAR_DECLARE: HighLevelILVarDeclare, # ("var", "var"), |
