diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-03-10 19:21:10 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-03-10 19:21:10 -0500 |
| commit | 29be664b3c91d135b54ed34976357bb7d3413e94 (patch) | |
| tree | 18f94e81f34feac3791f6f4387290e76983c4434 /mediumlevelil.cpp | |
| parent | a51f7666462341f77e3223ff2b6ab218688dfa8c (diff) | |
Mappings between low level IL and medium level IL
Diffstat (limited to 'mediumlevelil.cpp')
| -rw-r--r-- | mediumlevelil.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/mediumlevelil.cpp b/mediumlevelil.cpp index f1f0bdd2..04b1cffd 100644 --- a/mediumlevelil.cpp +++ b/mediumlevelil.cpp @@ -268,6 +268,12 @@ size_t MediumLevelILFunction::GetInstructionCount() const } +size_t MediumLevelILFunction::GetExprCount() const +{ + return BNGetMediumLevelILExprCount(m_object); +} + + void MediumLevelILFunction::Finalize() { BNFinalizeMediumLevelILFunction(m_object); @@ -436,3 +442,36 @@ RegisterValue MediumLevelILFunction::GetExprValue(size_t expr) BNRegisterValue value = BNGetMediumLevelILExprValue(m_object, expr); return RegisterValue::FromAPIObject(value); } + + +size_t MediumLevelILFunction::GetSSAVarIndexAtInstruction(const BNILVariable& var, size_t instr) const +{ + return BNGetMediumLevelILSSAVarIndexAtILInstruction(m_object, &var, instr); +} + + +size_t MediumLevelILFunction::GetSSAMemoryIndexAtInstruction(size_t instr) const +{ + return BNGetMediumLevelILSSAMemoryIndexAtILInstruction(m_object, instr); +} + + +Ref<LowLevelILFunction> MediumLevelILFunction::GetLowLevelIL() const +{ + BNLowLevelILFunction* func = BNGetLowLevelILForMediumLevelIL(m_object); + if (!func) + return nullptr; + return new LowLevelILFunction(func); +} + + +size_t MediumLevelILFunction::GetLowLevelILInstructionIndex(size_t instr) const +{ + return BNGetLowLevelILInstructionIndex(m_object, instr); +} + + +size_t MediumLevelILFunction::GetLowLevelILExprIndex(size_t expr) const +{ + return BNGetLowLevelILExprIndex(m_object, expr); +} |
