diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-03-13 23:03:41 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-03-13 23:03:54 -0400 |
| commit | 42cb99079d4ff0a5aa49e7730bb73500d13f35dd (patch) | |
| tree | 03c6a4899fc6d8c5eab5dd09742c608c7e3a104c /mediumlevelil.cpp | |
| parent | 29be664b3c91d135b54ed34976357bb7d3413e94 (diff) | |
Branch dependence APIs for path sensitive analysis
Diffstat (limited to 'mediumlevelil.cpp')
| -rw-r--r-- | mediumlevelil.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mediumlevelil.cpp b/mediumlevelil.cpp index 04b1cffd..dcd1fe8e 100644 --- a/mediumlevelil.cpp +++ b/mediumlevelil.cpp @@ -456,6 +456,26 @@ size_t MediumLevelILFunction::GetSSAMemoryIndexAtInstruction(size_t instr) const } +BNILBranchDependence MediumLevelILFunction::GetBranchDependenceAtInstruction(size_t curInstr, size_t branchInstr) const +{ + return BNGetMediumLevelILBranchDependence(m_object, curInstr, branchInstr); +} + + +map<size_t, BNILBranchDependence> MediumLevelILFunction::GetAllBranchDependenceAtInstruction(size_t instr) const +{ + size_t count; + BNILBranchInstructionAndDependence* deps = BNGetAllMediumLevelILBranchDependence(m_object, instr, &count); + + map<size_t, BNILBranchDependence> result; + for (size_t i = 0; i < count; i++) + result[deps[i].branch] = deps[i].dependence; + + BNFreeILBranchDependenceList(deps); + return result; +} + + Ref<LowLevelILFunction> MediumLevelILFunction::GetLowLevelIL() const { BNLowLevelILFunction* func = BNGetLowLevelILForMediumLevelIL(m_object); |
