summaryrefslogtreecommitdiff
path: root/lowlevelil.cpp
diff options
context:
space:
mode:
authorRyan Snyder <ryan@vector35.com>2018-08-20 18:58:00 -0400
committerRyan Snyder <ryan@vector35.com>2018-08-20 18:59:04 -0400
commitcecb2af5e8ec590500379e4b103531649de4e5a2 (patch)
treec214a9910d3f67d94087ba507951b8dd95d4026d /lowlevelil.cpp
parent1e6336e12229add2f1716019d1b050c7f989dbaa (diff)
api: add methods to get basic block objects from IL instrs
Diffstat (limited to 'lowlevelil.cpp')
-rw-r--r--lowlevelil.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lowlevelil.cpp b/lowlevelil.cpp
index 79138159..40748327 100644
--- a/lowlevelil.cpp
+++ b/lowlevelil.cpp
@@ -491,6 +491,15 @@ vector<Ref<BasicBlock>> LowLevelILFunction::GetBasicBlocks() const
}
+Ref<BasicBlock> LowLevelILFunction::GetBasicBlockForInstruction(size_t i) const
+{
+ BNBasicBlock* block = BNGetLowLevelILBasicBlockForInstruction(m_object, i);
+ if (!block)
+ return nullptr;
+ return new BasicBlock(block);
+}
+
+
Ref<LowLevelILFunction> LowLevelILFunction::GetSSAForm() const
{
BNLowLevelILFunction* func = BNGetLowLevelILSSAForm(m_object);