diff options
| author | Rusty Wagner <rusty@vector35.com> | 2018-04-02 23:30:56 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2018-04-02 23:31:59 -0400 |
| commit | fa716fe2da53a4f136380b1f60197bd197b2793a (patch) | |
| tree | 9a8baea24f8d40072e75f33f76900fde5ee473fc /basicblock.cpp | |
| parent | 5055d38ef59c570d21dcb6ce6855961e270f1042 (diff) | |
Add plugin commands for LLIL and MLIL
Diffstat (limited to 'basicblock.cpp')
| -rw-r--r-- | basicblock.cpp | 37 |
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); +} |
