summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2019-04-22 16:40:59 -0400
committerBrian Potchik <brian@vector35.com>2019-04-22 16:40:59 -0400
commit88043ec27091e58ed88f3a3d09ef726425c7dd8e (patch)
treeff53d7967e7c2b8cadd540355925aa14bf56cbbd /python
parent9969e70ed879fbfa2bf9fdecf2d9012795bed1a3 (diff)
Updates to support get_ssa function returning Instructions instead of indices.
Diffstat (limited to 'python')
-rw-r--r--python/examples/triage/imports.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/examples/triage/imports.py b/python/examples/triage/imports.py
index 008d22e3..3e09b93d 100644
--- a/python/examples/triage/imports.py
+++ b/python/examples/triage/imports.py
@@ -47,7 +47,7 @@ def get_platform_info(bv):
return result
def propagate_var_name(func, mlil_ssa_func, ssa_var, name, ty):
- instructions = mlil_ssa_func.get_ssa_var_uses(ssa_var)
+ instructions = list(map(lambda instr: instr.instr_index, mlil_ssa_func.get_ssa_var_uses(ssa_var)))
seen_instructions = set()
handled_vars = set([ssa_var])
@@ -67,7 +67,7 @@ def propagate_var_name(func, mlil_ssa_func, ssa_var, name, ty):
handled_vars.add(instruction.dest)
- for use in mlil_ssa_func.get_ssa_var_uses(instruction.dest):
+ for use in list(map(lambda instr: instr.instr_index, mlil_ssa_func.get_ssa_var_uses(instruction.dest))):
if use not in seen_instructions:
instructions.append(use)
@@ -87,7 +87,7 @@ def propagate_var_name(func, mlil_ssa_func, ssa_var, name, ty):
continue
handled_vars.add(instruction.dest)
- for use in mlil_ssa_func.get_ssa_var_uses(instruction.dest):
+ for use in list(map(lambda instr: instr.instr_index, mlil_ssa_func.get_ssa_var_uses(instruction.dest))):
if use not in seen_instructions:
instructions.append(use)