summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2021-11-01 23:37:09 -0400
committerKyleMiles <krm504@nyu.edu>2021-11-11 16:16:40 -0500
commitf80fe07a3534cf2869d616aef12681bd83a00b0e (patch)
tree68dab106570089a8cca985ea7b45395c630bc0f8 /python
parentcf762601b42ae4365d271c3825d59720718047a2 (diff)
Resolves #2681; Return the SSAFunction's version of .ssa_vars from the non-SSA forms (pass the call from *LevelILFunction to *LevelILSSAFunction)
Diffstat (limited to 'python')
-rw-r--r--python/highlevelil.py2
-rw-r--r--python/lowlevelil.py2
-rw-r--r--python/mediumlevelil.py2
3 files changed, 6 insertions, 0 deletions
diff --git a/python/highlevelil.py b/python/highlevelil.py
index 575fe025..e5b9311d 100644
--- a/python/highlevelil.py
+++ b/python/highlevelil.py
@@ -2434,6 +2434,8 @@ class HighLevelILFunction:
return result
finally:
core.BNFreeVariableList(core_variables)
+ elif self.il_form == FunctionGraphType.HighLevelILFunctionGraph:
+ return self.ssa_form.ssa_vars
return []
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index 50e058e9..4d320d18 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -3013,6 +3013,8 @@ class LowLevelILFunction:
"""This is the union `LowLevelILFunction.ssa_registers`, `LowLevelILFunction.ssa_register_stacks`, and `LowLevelILFunction.ssa_flags`"""
if self.il_form == FunctionGraphType.LowLevelILSSAFormFunctionGraph:
return self.ssa_registers + self.ssa_register_stacks + self.ssa_flags # type: ignore
+ elif self.il_form == FunctionGraphType.LowLevelILFunctionGraph:
+ return self.ssa_form.ssa_vars
return []
def get_instruction_start(self, addr:int, arch:Optional['architecture.Architecture']=None) -> Optional[int]:
diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py
index 0474fcea..becc22da 100644
--- a/python/mediumlevelil.py
+++ b/python/mediumlevelil.py
@@ -3082,6 +3082,8 @@ class MediumLevelILFunction:
return result
finally:
core.BNFreeVariableList(core_variables)
+ elif self.il_form in [FunctionGraphType.MediumLevelILFunctionGraph, FunctionGraphType.MappedMediumLevelILFunctionGraph]:
+ return self.ssa_form.ssa_vars
return []