summaryrefslogtreecommitdiff
path: root/basicblock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'basicblock.cpp')
-rw-r--r--basicblock.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/basicblock.cpp b/basicblock.cpp
index d42a1038..33f57d40 100644
--- a/basicblock.cpp
+++ b/basicblock.cpp
@@ -276,6 +276,7 @@ vector<DisassemblyTextLine> BasicBlock::GetDisassemblyText(DisassemblySettings*
{
DisassemblyTextLine line;
line.addr = lines[i].addr;
+ line.instrIndex = lines[i].instrIndex;
line.tokens.reserve(lines[i].count);
for (size_t j = 0; j < lines[i].count; j++)
{
@@ -417,3 +418,39 @@ bool BasicBlock::IsBackEdge(BasicBlock* source, BasicBlock* target)
}
return false;
}
+
+
+bool BasicBlock::IsILBlock() const
+{
+ return BNIsILBasicBlock(m_object);
+}
+
+
+bool BasicBlock::IsLowLevelILBlock() const
+{
+ return BNIsLowLevelILBasicBlock(m_object);
+}
+
+
+bool BasicBlock::IsMediumLevelILBlock() const
+{
+ return BNIsMediumLevelILBasicBlock(m_object);
+}
+
+
+Ref<LowLevelILFunction> BasicBlock::GetLowLevelILFunction() const
+{
+ BNLowLevelILFunction* func = BNGetBasicBlockLowLevelILFunction(m_object);
+ if (!func)
+ return nullptr;
+ return new LowLevelILFunction(func);
+}
+
+
+Ref<MediumLevelILFunction> BasicBlock::GetMediumLevelILFunction() const
+{
+ BNMediumLevelILFunction* func = BNGetBasicBlockMediumLevelILFunction(m_object);
+ if (!func)
+ return nullptr;
+ return new MediumLevelILFunction(func);
+}