summaryrefslogtreecommitdiff
path: root/python/lowlevelil.py
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2021-01-27 16:03:02 -0500
committerBrian Potchik <brian@vector35.com>2021-01-27 16:03:02 -0500
commit51d0f18eb4df16263867ef157b5293bb1b44f77a (patch)
treea7af13bc176f4625dc377a07ed830ea40f6ddcc4 /python/lowlevelil.py
parentbbdef20ca8c5489dc8aac4f31b0269dba80b4e87 (diff)
Finish HLIL expression mapping APIs.
Diffstat (limited to 'python/lowlevelil.py')
-rw-r--r--python/lowlevelil.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index 1ef13fa4..310d9d79 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -1017,7 +1017,7 @@ class LowLevelILInstruction(object):
@property
def mlils(self):
- exprs = self.function.get_medium_level_il_expr_indexes(self.expr_index)
+ exprs = self._function.get_medium_level_il_expr_indexes(self.expr_index)
result = []
for expr in exprs:
result.append(binaryninja.mediumlevelil.MediumLevelILInstruction(self._function.medium_level_il, expr))
@@ -1047,6 +1047,14 @@ class LowLevelILInstruction(object):
return self.high_level_il
@property
+ def hlils(self):
+ result = set()
+ for mlil_expr in self.mlils:
+ for hlil_expr in mlil_expr.hlils:
+ result.add(hlil_expr)
+ return list(result)
+
+ @property
def value(self):
"""Value of expression if constant or a known value (read-only)"""
value = core.BNGetLowLevelILExprValue(self._function.handle, self.expr_index)