From 9aa54ef6723ad06b019c02c22b574516dca6289b Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Mon, 21 Oct 2024 10:55:45 -0400 Subject: Linear view function regions collapse Update collapse code to support PseudoC --- binaryninjaapi.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 884861bb..bcaf644e 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -4367,6 +4367,7 @@ namespace BinaryNinja { class TypeLibrary; class TypeArchive; class MemoryMap; + struct HighLevelILInstruction; class QueryMetadataException : public ExceptionWithStackTrace { @@ -10501,6 +10502,8 @@ namespace BinaryNinja { { int m_advancedAnalysisRequests; + bool IsRegionCollapsed(uint64_t hash) const; + public: Function(BNFunction* func); virtual ~Function(); @@ -11094,6 +11097,14 @@ namespace BinaryNinja { Confidence IsInlinedDuringAnalysis(); void SetAutoInlinedDuringAnalysis(Confidence inlined); void SetUserInlinedDuringAnalysis(Confidence inlined); + + // TODO: Documentation + bool IsInstructionCollapsed(const HighLevelILInstruction& instr, uint64_t designator = 0) const; + bool IsCollapsed() const; + void ToggleRegion(uint64_t hash); + void CollapseRegion(uint64_t hash); + void ExpandRegion(uint64_t hash); + void ExpandAll(); }; /*! @@ -18445,6 +18456,12 @@ namespace BinaryNinja { InstructionTextToken::FreeInstructionTextToken(&converted); } + void PrependCollapseIndicator(); + void PrependCollapseIndicator(Ref function, const HighLevelILInstruction& instr, uint64_t designator = 0); + void PrependCollapseIndicator(BNInstructionTextTokenContext context, uint64_t hash); + bool HasCollapsableRegions(); + void SetHasCollapsableRegions(bool state); + /*! Starts a new line in the output. */ void NewLine(); -- cgit v1.3.1