diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-02-23 18:34:03 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-02-23 18:34:03 -0500 |
| commit | dbe5606575f6b59b82eff2f9ab7b41990b57147e (patch) | |
| tree | c940da5574655aaa9e792f0db256374eb17d7d32 /lowlevelil.cpp | |
| parent | c687ea8692ee553476280ee5b621e861b627fa80 (diff) | |
Instruction starts and SSA form are a property of IL functions
Diffstat (limited to 'lowlevelil.cpp')
| -rw-r--r-- | lowlevelil.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lowlevelil.cpp b/lowlevelil.cpp index bf3b980e..1a353b51 100644 --- a/lowlevelil.cpp +++ b/lowlevelil.cpp @@ -48,9 +48,15 @@ uint64_t LowLevelILFunction::GetCurrentAddress() const } -void LowLevelILFunction::SetCurrentAddress(uint64_t addr) +void LowLevelILFunction::SetCurrentAddress(Architecture* arch, uint64_t addr) { - BNLowLevelILSetCurrentAddress(m_object, addr); + BNLowLevelILSetCurrentAddress(m_object, arch ? arch->GetObject() : nullptr, addr); +} + + +size_t LowLevelILFunction::GetInstructionStart(Architecture* arch, uint64_t addr) +{ + return BNLowLevelILGetInstructionStart(m_object, arch ? arch->GetObject() : nullptr, addr); } @@ -643,3 +649,12 @@ vector<Ref<BasicBlock>> LowLevelILFunction::GetBasicBlocks() const BNFreeBasicBlockList(blocks, count); return result; } + + +Ref<LowLevelILFunction> LowLevelILFunction::GetSSAForm() const +{ + BNLowLevelILFunction* func = BNGetLowLevelILSSAForm(m_object); + if (!func) + return nullptr; + return new LowLevelILFunction(func); +} |
