summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/mediumlevelil.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py
index c1c4d231..1ae61d38 100644
--- a/python/mediumlevelil.py
+++ b/python/mediumlevelil.py
@@ -85,6 +85,20 @@ class SSAVariable:
def dead_store_elimination(self) -> DeadStoreElimination:
return self.var.dead_store_elimination
+ @property
+ def def_site(self) -> Optional['MediumLevelILInstruction']:
+ """
+ Gets the MediumLevelILInstruction where this SSAVariable is defined.
+ """
+ return self.var.function.get_ssa_var_definition(self)
+
+ @property
+ def use_sites(self) -> List['MediumLevelILInstruction']:
+ """
+ Gets the list of MediumLevelILInstructions where this SSAVariable is used inside of this function.
+ """
+ return self.var.function.get_ssa_var_uses(self)
+
class MediumLevelILLabel:
def __init__(self, handle: Optional[core.BNMediumLevelILLabel] = None):