diff options
| author | Peter LaFosse <peter@vector35.com> | 2024-10-21 10:55:45 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2024-10-23 20:37:38 -0400 |
| commit | 9aa54ef6723ad06b019c02c22b574516dca6289b (patch) | |
| tree | e0b420a8a609f4644607cad7f6170cf36ee26771 /function.cpp | |
| parent | c446e3acbcb0dc750a840551fa7cb54c184e7acb (diff) | |
Linear view function regions collapse
Update collapse code to support PseudoC
Diffstat (limited to 'function.cpp')
| -rw-r--r-- | function.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/function.cpp b/function.cpp index 33cb5e52..ab441193 100644 --- a/function.cpp +++ b/function.cpp @@ -20,6 +20,7 @@ #include "binaryninjaapi.h" #include "mediumlevelilinstruction.h" +#include "highlevelilinstruction.h" #include <cstring> using namespace BinaryNinja; @@ -3261,6 +3262,47 @@ void Function::SetUserInlinedDuringAnalysis(Confidence<bool> inlined) } +void Function::ToggleRegion(uint64_t hash) +{ + BNFunctionToggleRegion(m_object, hash); +} + + +void Function::CollapseRegion(uint64_t hash) +{ + BNFunctionCollapseRegion(m_object, hash); +} + + +void Function::ExpandRegion(uint64_t hash) +{ + BNFunctionExpandRegion(m_object, hash); +} + + +bool Function::IsCollapsed() const +{ + return IsRegionCollapsed(GetStart()); +} + + +bool Function::IsInstructionCollapsed(const HighLevelILInstruction& instr, uint64_t designator) const +{ + return IsRegionCollapsed(instr.GetInstructionHash(designator)); +} + + +bool Function::IsRegionCollapsed(uint64_t hash) const +{ + return BNFunctionIsRegionCollapsed(m_object, hash); +} + + +void Function::ExpandAll() +{ + BNFunctionExpandAll(m_object); +} + AdvancedFunctionAnalysisDataRequestor::AdvancedFunctionAnalysisDataRequestor(Function* func) : m_func(func) { if (m_func) |
