summaryrefslogtreecommitdiff
path: root/python/lowlevelil.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2019-12-19 16:04:11 -0500
committerRusty Wagner <rusty@vector35.com>2019-12-19 16:04:11 -0500
commit741fb0538e0ac6ab14928f78697196803dbd2ed5 (patch)
treedd0b8da88791b03553d659e6672c8d5ba0fdecfa /python/lowlevelil.py
parent98771ab9f325e310ae07120cf559f601837380f9 (diff)
LLIL_JUMP_TO/MLIL_JUMP_TO now contain mappings from address to destination instruction
Diffstat (limited to 'python/lowlevelil.py')
-rw-r--r--python/lowlevelil.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index b77ce10a..5f71b80c 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -550,7 +550,7 @@ class LowLevelILInstruction(object):
LowLevelILOperation.LLIL_ZX: [("src", "expr")],
LowLevelILOperation.LLIL_LOW_PART: [("src", "expr")],
LowLevelILOperation.LLIL_JUMP: [("dest", "expr")],
- LowLevelILOperation.LLIL_JUMP_TO: [("dest", "expr"), ("targets", "int_list")],
+ LowLevelILOperation.LLIL_JUMP_TO: [("dest", "expr"), ("targets", "target_map")],
LowLevelILOperation.LLIL_CALL: [("dest", "expr")],
LowLevelILOperation.LLIL_CALL_STACK_ADJUST: [("dest", "expr"), ("stack_adjustment", "int"), ("reg_stack_adjustments", "reg_stack_adjust")],
LowLevelILOperation.LLIL_TAILCALL: [("dest", "expr")],
@@ -785,6 +785,16 @@ class LowLevelILInstruction(object):
adjust |= ~0x80000000
value[func.arch.get_reg_stack_name(reg_stack)] = adjust
core.BNLowLevelILFreeOperandList(operand_list)
+ elif operand_type == "target_map":
+ count = ctypes.c_ulonglong()
+ operand_list = core.BNLowLevelILGetOperandList(func.handle, self.expr_index, i, count)
+ i += 1
+ value = {}
+ for j in range(count.value // 2):
+ key = operand_list[j * 2]
+ target = operand_list[(j * 2) + 1]
+ value[key] = target
+ core.BNLowLevelILFreeOperandList(operand_list)
self._operands.append(value)
self.__dict__[name] = value
i += 1