diff options
| author | Ryan Snyder <ryan@vector35.com> | 2018-08-20 18:58:00 -0400 |
|---|---|---|
| committer | Ryan Snyder <ryan@vector35.com> | 2018-08-20 18:59:04 -0400 |
| commit | cecb2af5e8ec590500379e4b103531649de4e5a2 (patch) | |
| tree | c214a9910d3f67d94087ba507951b8dd95d4026d /python | |
| parent | 1e6336e12229add2f1716019d1b050c7f989dbaa (diff) | |
api: add methods to get basic block objects from IL instrs
Diffstat (limited to 'python')
| -rw-r--r-- | python/lowlevelil.py | 5 | ||||
| -rw-r--r-- | python/mediumlevelil.py | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py index e714eb48..41579719 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -537,6 +537,11 @@ class LowLevelILInstruction(object): return result @property + def il_basic_block(self): + """IL basic block object containing this expression (read-only) (only available on finalized functions)""" + return LowLevelILBasicBlock(self.function.source_function.view, core.BNGetLowLevelILBasicBlockForInstruction(self.function.handle, self.instr_index), self.function) + + @property def ssa_form(self): """SSA form of expression (read-only)""" return LowLevelILInstruction(self.function.ssa_form, diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py index cfa8f900..c024d287 100644 --- a/python/mediumlevelil.py +++ b/python/mediumlevelil.py @@ -334,6 +334,11 @@ class MediumLevelILInstruction(object): return result @property + def il_basic_block(self): + """IL basic block object containing this expression (read-only) (only available on finalized functions)""" + return MediumLevelILBasicBlock(self.function.source_function.view, core.BNGetMediumLevelILBasicBlockForInstruction(self.function.handle, self.instr_index), self.function) + + @property def ssa_form(self): """SSA form of expression (read-only)""" return MediumLevelILInstruction(self.function.ssa_form, |
