From af05063f05b0b126a15b996d1954b90d0d17c05a Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Wed, 9 Feb 2022 23:40:54 -0500 Subject: OpenView for 2 more argument types: data and bv --- binaryninjaapi.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 37b7bb71..04cdfd12 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -667,6 +667,42 @@ namespace BinaryNinja { */ Ref OpenView(const std::string& filename, bool updateAnalysis = true, std::function progress = {}, Json::Value options = Json::Value(Json::objectValue)); + /*! + Open a BinaryView from a raw data buffer, initializing data views and loading settings. + + See BinaryNinja::OpenView(const std::string&, bool, std::function, Json::Value) + for discussion of this function. + + \param rawData Buffer with raw binary data to load (cannot load from bndb) + \param updateAnalysis If true, UpdateAnalysisAndWait() will be called after opening + a BinaryView. + \param progress Optional function to be called with progress updates as the view is + being loaded. If the function returns false, it will cancel OpenView. + \param options A Json object whose keys are setting identifiers and whose values are + the desired settings. + \return Constructed view, or a nullptr Ref + */ + Ref OpenView(const DataBuffer& rawData, bool updateAnalysis = true, std::function progress = {}, Json::Value options = Json::Value(Json::objectValue)); + + + /*! + Open a BinaryView from a raw BinaryView, initializing data views and loading settings. + + See BinaryNinja::OpenView(const std::string&, bool, std::function, Json::Value) + for discussion of this function. + + \param rawData BinaryView with raw binary data to load + \param updateAnalysis If true, UpdateAnalysisAndWait() will be called after opening + a BinaryView. + \param progress Optional function to be called with progress updates as the view is + being loaded. If the function returns false, it will cancel OpenView. + \param options A Json object whose keys are setting identifiers and whose values are + the desired settings. + \param isDatabase True if the view being loaded is the raw view of an already opened database. + \return Constructed view, or a nullptr Ref + */ + Ref OpenView(Ref rawData, bool updateAnalysis = true, std::function progress = {}, Json::Value options = Json::Value(Json::objectValue), bool isDatabase = false); + bool DemangleMS(Architecture* arch, const std::string& mangledName, Type** outType, QualifiedName& outVarName, const bool simplify = false); bool DemangleMS(Architecture* arch, const std::string& mangledName, Type** outType, QualifiedName& outVarName, -- cgit v1.3.1