From 77da98d11f935d3bd5013ec9ae6d2637186e6b2c Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Tue, 25 Nov 2025 11:28:39 -0500 Subject: Add SectionMap with bulk operations and batch section APIs. --- binaryninjaapi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index e29f4084..9cef3ee0 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -7840,6 +7840,15 @@ namespace BinaryNinja { uint64_t entrySize = 0, const std::string& linkedSection = "", const std::string& infoSection = "", uint64_t infoData = 0); + /*! Adds multiple automatically defined sections in a batch operation + + This method is more efficient than calling AddAutoSection multiple times as it only triggers + one SectionMap rebuild for all sections. + + \param sections Vector of BNSectionInfo describing the sections to add + */ + void AddAutoSections(const std::vector& sections); + /*! Remove an automatically defined section by name \param name Name of the section @@ -7867,6 +7876,17 @@ namespace BinaryNinja { uint64_t entrySize = 0, const std::string& linkedSection = "", const std::string& infoSection = "", uint64_t infoData = 0); + /*! Adds multiple user-defined sections in a batch operation + + This method is more efficient than calling AddUserSection multiple times as it only triggers + one SectionMap rebuild for all sections. + + Note that all data specified must already be mapped by an existing segment. + + \param sections Vector of BNSectionInfo describing the sections to add + */ + void AddUserSections(const std::vector& sections); + /*! Remove a user defined section by name \param name Name of the section to remove -- cgit v1.3.1