summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demangler/gnu3/CMakeLists.txt2
-rw-r--r--demangler/gnu3/demangle_gnu3.cpp19
-rw-r--r--demangler/gnu3/demangle_gnu3.h127
-rw-r--r--demangler/msvc/CMakeLists.txt2
-rw-r--r--demangler/msvc/demangle_msvc.cpp20
-rw-r--r--demangler/msvc/demangle_msvc.h133
6 files changed, 184 insertions, 119 deletions
diff --git a/demangler/gnu3/CMakeLists.txt b/demangler/gnu3/CMakeLists.txt
index 58d7fe4f..95392c5f 100644
--- a/demangler/gnu3/CMakeLists.txt
+++ b/demangler/gnu3/CMakeLists.txt
@@ -41,4 +41,6 @@ if(BN_INTERNAL_BUILD)
set_target_properties(${PROJECT_NAME} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR}
RUNTIME_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR})
+else()
+ bn_install_plugin(${PROJECT_NAME})
endif()
diff --git a/demangler/gnu3/demangle_gnu3.cpp b/demangler/gnu3/demangle_gnu3.cpp
index 412003d1..fdef5b8f 100644
--- a/demangler/gnu3/demangle_gnu3.cpp
+++ b/demangler/gnu3/demangle_gnu3.cpp
@@ -15,15 +15,19 @@
// Includes snippets from LLVM, which is under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-#include "binaryninjaapi.h"
+#include "demangle_gnu3.h"
#include <stdarg.h>
#include <algorithm>
#include <memory>
-#include "demangle_gnu3.h"
+#ifdef BINARYNINJACORE_LIBRARY
+using namespace BinaryNinjaCore;
+#define GetClass GetTypeClass
+#else
using namespace BinaryNinja;
using namespace std;
+#endif
#define MAX_DEMANGLE_LENGTH 4096
@@ -2346,8 +2350,13 @@ public:
return DemangleGNU3::IsGNU3MangledString(name);
}
+#ifdef BINARYNINJACORE_LIBRARY
+ virtual bool Demangle(Architecture* arch, const string& name, Ref<Type>& outType, QualifiedName& outVarName,
+ BinaryView* view) override
+#else
virtual bool Demangle(Ref<Architecture> arch, const string& name, Ref<Type>& outType, QualifiedName& outVarName,
Ref<BinaryView> view) override
+#endif
{
if (view)
return DemangleGNU3::DemangleStringGNU3(arch, name, outType, outVarName, view);
@@ -2358,9 +2367,13 @@ public:
extern "C"
{
+#ifndef BINARYNINJACORE_LIBRARY
BN_DECLARE_CORE_ABI_VERSION
+#endif
-#ifdef DEMO_EDITION
+#ifdef BINARYNINJACORE_LIBRARY
+ bool DemangleGNU3PluginInit()
+#elif defined(DEMO_EDITION)
bool DemangleGNU3PluginInit()
#else
BINARYNINJAPLUGIN bool CorePluginInit()
diff --git a/demangler/gnu3/demangle_gnu3.h b/demangler/gnu3/demangle_gnu3.h
index ad1303e6..721ffaba 100644
--- a/demangler/gnu3/demangle_gnu3.h
+++ b/demangler/gnu3/demangle_gnu3.h
@@ -15,14 +15,31 @@
#pragma once
#include <stdexcept>
#include <exception>
-#include "binaryninjaapi.h"
+// XXX: Compiled directly into the core for performance reasons
+// Will still work fine compiled independently, just at about a
+// 50-100% performance penalty due to FFI overhead
+#ifdef BINARYNINJACORE_LIBRARY
+#include "qualifiedname.h"
+#include "type.h"
+#include "architecture.h"
+#include "binaryview.h"
+#include "demangle.h"
+#define BN BinaryNinjaCore
+#define _STD_STRING BinaryNinjaCore::string
+#define _STD_VECTOR BinaryNinjaCore::vector
+#else
+#include "binaryninjaapi.h"
+#define BN BinaryNinja
+#define _STD_STRING std::string
+#define _STD_VECTOR std::vector
+#endif
class DemangleException: public std::exception
{
- std::string m_message;
+ _STD_STRING m_message;
public:
- DemangleException(std::string msg="Attempt to read beyond bounds or missing expected character"): m_message(msg){}
+ DemangleException(_STD_STRING msg="Attempt to read beyond bounds or missing expected character"): m_message(msg){}
virtual const char* what() const noexcept { return m_message.c_str(); }
};
@@ -31,43 +48,43 @@ class DemangleGNU3
class Reader
{
public:
- Reader(const std::string& data);
- std::string PeekString(size_t count=1);
+ Reader(const _STD_STRING& data);
+ _STD_STRING PeekString(size_t count=1);
char Peek();
- bool NextIsOneOf(const std::string& list);
- std::string GetRaw();
+ bool NextIsOneOf(const _STD_STRING& list);
+ _STD_STRING GetRaw();
char Read();
- std::string ReadString(size_t count=1);
- std::string ReadUntil(char sentinal);
+ _STD_STRING ReadString(size_t count=1);
+ _STD_STRING ReadUntil(char sentinal);
void Consume(size_t count=1);
size_t Length() const;
void UnRead(size_t count=1);
private:
- std::string m_data;
+ _STD_STRING m_data;
size_t m_offset;
};
class SubstitutionList
{
- std::vector<BinaryNinja::TypeBuilder> m_typeList;
+ _STD_VECTOR<BN::TypeBuilder> m_typeList;
public:
SubstitutionList();
~SubstitutionList();
- void PushType(BinaryNinja::TypeBuilder t);
+ void PushType(BN::TypeBuilder t);
void PopType();
- const BinaryNinja::TypeBuilder& GetType(size_t reference) const;
+ const BN::TypeBuilder& GetType(size_t reference) const;
void PrintSubstitutionTable() const;
size_t Size() const { return m_typeList.size(); }
void Clear() { m_typeList.clear(); }
};
- BinaryNinja::QualifiedName m_varName;
+ BN::QualifiedName m_varName;
Reader m_reader;
- BinaryNinja::Architecture* m_arch;
- std::vector<BinaryNinja::TypeBuilder> m_substitute;
- std::vector<BinaryNinja::TypeBuilder> m_templateSubstitute;
- std::vector<std::vector<BinaryNinja::TypeBuilder>> m_functionSubstitute;
- std::string m_lastName;
+ BN::Architecture* m_arch;
+ _STD_VECTOR<BN::TypeBuilder> m_substitute;
+ _STD_VECTOR<BN::TypeBuilder> m_templateSubstitute;
+ _STD_VECTOR<_STD_VECTOR<BN::TypeBuilder>> m_functionSubstitute;
+ _STD_STRING m_lastName;
BNNameType m_nameType;
bool m_localType;
bool m_hasReturnType;
@@ -76,47 +93,47 @@ class DemangleGNU3
bool m_topLevel;
bool m_isOperatorOverload;
enum SymbolType { Function, FunctionWithReturn, Data, VTable, Rtti, Name};
- BinaryNinja::QualifiedName DemangleBaseUnresolvedName();
- BinaryNinja::TypeBuilder DemangleUnresolvedType();
- std::string DemangleUnarySuffixExpression(const std::string& op);
- std::string DemangleUnaryPrefixExpression(const std::string& op);
- std::string DemangleBinaryExpression(const std::string& op);
- std::string DemangleUnaryPrefixType(const std::string& op);
- std::string DemangleTypeString();
- std::string DemangleExpressionList();
- BinaryNinja::TypeBuilder DemangleUnqualifiedName();
- std::string DemangleSourceName();
- std::string DemangleNumberAsString();
- std::string DemangleInitializer();
- std::string DemangleExpression();
- std::string DemanglePrimaryExpression();
- BinaryNinja::TypeBuilder DemangleName();
- BinaryNinja::TypeBuilder DemangleLocalName();
+ BN::QualifiedName DemangleBaseUnresolvedName();
+ BN::TypeBuilder DemangleUnresolvedType();
+ _STD_STRING DemangleUnarySuffixExpression(const _STD_STRING& op);
+ _STD_STRING DemangleUnaryPrefixExpression(const _STD_STRING& op);
+ _STD_STRING DemangleBinaryExpression(const _STD_STRING& op);
+ _STD_STRING DemangleUnaryPrefixType(const _STD_STRING& op);
+ _STD_STRING DemangleTypeString();
+ _STD_STRING DemangleExpressionList();
+ BN::TypeBuilder DemangleUnqualifiedName();
+ _STD_STRING DemangleSourceName();
+ _STD_STRING DemangleNumberAsString();
+ _STD_STRING DemangleInitializer();
+ _STD_STRING DemangleExpression();
+ _STD_STRING DemanglePrimaryExpression();
+ BN::TypeBuilder DemangleName();
+ BN::TypeBuilder DemangleLocalName();
void DemangleCVQualifiers(bool& cnst, bool& vltl, bool& rstrct);
- BinaryNinja::TypeBuilder DemangleSubstitution();
- const BinaryNinja::TypeBuilder& DemangleTemplateSubstitution();
- void DemangleTemplateArgs(std::vector<BinaryNinja::FunctionParameter>& args);
- bool DemangleEncoding(BinaryNinja::Type** type, BinaryNinja::QualifiedName& outName);
- BinaryNinja::TypeBuilder DemangleFunction(bool cnst, bool vltl);
- BinaryNinja::TypeBuilder DemangleType();
+ BN::TypeBuilder DemangleSubstitution();
+ const BN::TypeBuilder& DemangleTemplateSubstitution();
+ void DemangleTemplateArgs(_STD_VECTOR<BN::FunctionParameter>& args);
+ bool DemangleEncoding(BN::Type** type, BN::QualifiedName& outName);
+ BN::TypeBuilder DemangleFunction(bool cnst, bool vltl);
+ BN::TypeBuilder DemangleType();
int64_t DemangleNumber();
- BinaryNinja::TypeBuilder DemangleNestedName();
- void PushTemplateType(BinaryNinja::TypeBuilder type);
- const BinaryNinja::TypeBuilder& GetTemplateType(size_t ref);
- void PushType(BinaryNinja::TypeBuilder type);
- const BinaryNinja::TypeBuilder& GetType(size_t ref);
- static bool DemangleGlobalHeader(std::string& name, std::string& header);
+ BN::TypeBuilder DemangleNestedName();
+ void PushTemplateType(BN::TypeBuilder type);
+ const BN::TypeBuilder& GetTemplateType(size_t ref);
+ void PushType(BN::TypeBuilder type);
+ const BN::TypeBuilder& GetType(size_t ref);
+ static bool DemangleGlobalHeader(_STD_STRING& name, _STD_STRING& header);
public:
- DemangleGNU3(BinaryNinja::Architecture* arch, const std::string& mangledName);
- BinaryNinja::TypeBuilder DemangleSymbol(BinaryNinja::QualifiedName& varName);
- BinaryNinja::QualifiedName GetVarName() const { return m_varName; }
- static bool IsGNU3MangledString(const std::string& name);
+ DemangleGNU3(BN::Architecture* arch, const _STD_STRING& mangledName);
+ BN::TypeBuilder DemangleSymbol(BN::QualifiedName& varName);
+ BN::QualifiedName GetVarName() const { return m_varName; }
+ static bool IsGNU3MangledString(const _STD_STRING& name);
- // Tread lightly on this landmine; a BinaryView* will be converted to a bool; use an explicit (BinaryNinja::Ref<BinaryNinja::BinaryView>)view cast
- static bool DemangleStringGNU3(BinaryNinja::Architecture* arch, const std::string& name, BinaryNinja::Ref<BinaryNinja::Type>& outType, BinaryNinja::QualifiedName& outVarName, const BinaryNinja::Ref<BinaryNinja::BinaryView>& view);
- static bool DemangleStringGNU3(BinaryNinja::Architecture* arch, const std::string& name, BinaryNinja::Ref<BinaryNinja::Type>& outType, BinaryNinja::QualifiedName& outVarName, BinaryNinja::BinaryView* view);
- static bool DemangleStringGNU3(BinaryNinja::Architecture* arch, const std::string& name, BinaryNinja::Ref<BinaryNinja::Type>& outType, BinaryNinja::QualifiedName& outVarName);
+ // Tread lightly on this landmine; a BinaryView* will be converted to a bool; use an explicit (BN::Ref<BN::BinaryView>)view cast
+ static bool DemangleStringGNU3(BN::Architecture* arch, const _STD_STRING& name, BN::Ref<BN::Type>& outType, BN::QualifiedName& outVarName, const BN::Ref<BN::BinaryView>& view);
+ static bool DemangleStringGNU3(BN::Architecture* arch, const _STD_STRING& name, BN::Ref<BN::Type>& outType, BN::QualifiedName& outVarName, BN::BinaryView* view);
+ static bool DemangleStringGNU3(BN::Architecture* arch, const _STD_STRING& name, BN::Ref<BN::Type>& outType, BN::QualifiedName& outVarName);
void PrintTables();
};
diff --git a/demangler/msvc/CMakeLists.txt b/demangler/msvc/CMakeLists.txt
index 0d524ce1..8a953d5e 100644
--- a/demangler/msvc/CMakeLists.txt
+++ b/demangler/msvc/CMakeLists.txt
@@ -41,4 +41,6 @@ if(BN_INTERNAL_BUILD)
set_target_properties(${PROJECT_NAME} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR}
RUNTIME_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR})
+else()
+ bn_install_plugin(${PROJECT_NAME})
endif()
diff --git a/demangler/msvc/demangle_msvc.cpp b/demangler/msvc/demangle_msvc.cpp
index 297da114..ab883771 100644
--- a/demangler/msvc/demangle_msvc.cpp
+++ b/demangler/msvc/demangle_msvc.cpp
@@ -15,12 +15,18 @@
// Includes snippets from LLVM, which is under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
-#include "binaryninjaapi.h"
#include "demangle_msvc.h"
#include <memory>
+
+#ifdef BINARYNINJACORE_LIBRARY
+using namespace BinaryNinjaCore;
+#define GetClass GetTypeClass
+#else
using namespace BinaryNinja;
using namespace std;
+#endif
+
#define MAX_DEMANGLE_LENGTH 4096
@@ -1860,8 +1866,13 @@ public:
return name[0] == '?';
}
+#ifdef BINARYNINJACORE_LIBRARY
+ virtual bool Demangle(Architecture* arch, const string& name, Ref<Type>& outType, QualifiedName& outVarName,
+ BinaryView* view) override
+#else
virtual bool Demangle(Ref<Architecture> arch, const string& name, Ref<Type>& outType, QualifiedName& outVarName,
Ref<BinaryView> view) override
+#endif
{
if (view)
return Demangle::DemangleMS(arch, name, outType, outVarName, view);
@@ -1869,12 +1880,15 @@ public:
}
};
-
extern "C"
{
+#ifndef BINARYNINJACORE_LIBRARY
BN_DECLARE_CORE_ABI_VERSION
+#endif
-#ifdef DEMO_EDITION
+#ifdef BINARYNINJACORE_LIBRARY
+ bool DemangleMSVCPluginInit()
+#elif defined(DEMO_EDITION)
bool DemangleMSVCPluginInit()
#else
BINARYNINJAPLUGIN bool CorePluginInit()
diff --git a/demangler/msvc/demangle_msvc.h b/demangler/msvc/demangle_msvc.h
index d52b666a..94502272 100644
--- a/demangler/msvc/demangle_msvc.h
+++ b/demangler/msvc/demangle_msvc.h
@@ -15,17 +15,34 @@
#pragma once
#include <stdexcept>
#include <exception>
-#include <string>
-#include <vector>
-#include <set>
-#include "binaryninjaapi.h"
+// XXX: Compiled directly into the core for performance reasons
+// Will still work fine compiled independently, just at about a
+// 50-100% performance penalty due to FFI overhead
+#ifdef BINARYNINJACORE_LIBRARY
+#include "qualifiedname.h"
+#include "type.h"
+#include "architecture.h"
+#include "binaryview.h"
+#include "demangle.h"
+#include "unicode.h"
+#define BN BinaryNinjaCore
+#define _STD_STRING BinaryNinjaCore::string
+#define _STD_VECTOR BinaryNinjaCore::vector
+#define _STD_SET BinaryNinjaCore::set
+#else
+#include "binaryninjaapi.h"
+#define BN BinaryNinja
+#define _STD_STRING std::string
+#define _STD_VECTOR std::vector
+#define _STD_SET std::set
+#endif
class DemangleException: public std::exception
{
- std::string m_message;
+ _STD_STRING m_message;
public:
- DemangleException(std::string msg="Attempt to read beyond bounds or missing expected character"): m_message(msg){}
+ DemangleException(_STD_STRING msg="Attempt to read beyond bounds or missing expected character"): m_message(msg){}
virtual const char* what() const noexcept { return m_message.c_str(); }
};
@@ -67,96 +84,96 @@ class Demangle
class Reader
{
public:
- Reader(std::string data);
- std::string PeekString(size_t count=1);
+ Reader(_STD_STRING data);
+ _STD_STRING PeekString(size_t count=1);
char Peek();
const char* GetRaw();
char Read();
- std::string ReadString(size_t count=1);
- std::string ReadUntil(char sentinal);
+ _STD_STRING ReadString(size_t count=1);
+ _STD_STRING ReadUntil(char sentinal);
void Consume(size_t count=1);
size_t Length();
private:
- std::string m_data;
+ _STD_STRING m_data;
};
class BackrefList
{
public:
- std::vector<BinaryNinja::TypeBuilder> typeList;
- std::vector<std::string> nameList;
- const BinaryNinja::TypeBuilder& GetTypeBackref(size_t reference);
- std::string GetStringBackref(size_t reference);
- void PushTypeBackref(BinaryNinja::TypeBuilder t);
- void PushStringBackref(std::string& s);
- void PushFrontStringBackref(std::string& s);
+ _STD_VECTOR<BN::TypeBuilder> typeList;
+ _STD_VECTOR<_STD_STRING> nameList;
+ const BN::TypeBuilder& GetTypeBackref(size_t reference);
+ _STD_STRING GetStringBackref(size_t reference);
+ void PushTypeBackref(BN::TypeBuilder t);
+ void PushStringBackref(_STD_STRING& s);
+ void PushFrontStringBackref(_STD_STRING& s);
};
Reader reader;
BackrefList m_backrefList;
- BinaryNinja::Architecture* m_arch;
- BinaryNinja::Ref<BinaryNinja::Platform> m_platform;
- BinaryNinja::Ref<BinaryNinja::BinaryView> m_view;
- BinaryNinja::QualifiedName m_varName;
- BinaryNinja::Ref<BinaryNinja::Logger> m_logger;
+ BN::Architecture* m_arch;
+ BN::Ref<BN::Platform> m_platform;
+ BN::Ref<BN::BinaryView> m_view;
+ BN::QualifiedName m_varName;
+ BN::Ref<BN::Logger> m_logger;
NameType GetNameType();
- BinaryNinja::TypeBuilder DemangleVarType(BackrefList& varList, bool isReturn, BinaryNinja::QualifiedName& name);
+ BN::TypeBuilder DemangleVarType(BackrefList& varList, bool isReturn, BN::QualifiedName& name);
void DemangleNumber(int64_t& num);
void DemangleChar(char& ch);
void DemangleWideChar(uint16_t& wch);
void DemangleModifiers(bool& _const, bool& _volatile, bool& isMember);
- std::set<BNPointerSuffix> DemanglePointerSuffix();
- void DemangleVariableList(std::vector<BinaryNinja::FunctionParameter>& paramList, BackrefList& varList);
+ _STD_SET<BNPointerSuffix> DemanglePointerSuffix();
+ void DemangleVariableList(_STD_VECTOR<BN::FunctionParameter>& paramList, BackrefList& varList);
void DemangleNameTypeRtti(BNNameType& classFunctionType,
BackrefList& nameBackrefList,
- std::string& out,
- std::string& rttiTypeName);
- void DemangleTypeNameLookup(std::string& out, BNNameType& functionType);
- void DemangleNameTypeString(std::string& out);
- void DemangleNameTypeBackref(std::string& out, const std::vector<std::string>& backrefList);
- void DemangleName(BinaryNinja::QualifiedName& nameList,
+ _STD_STRING& out,
+ _STD_STRING& rttiTypeName);
+ void DemangleTypeNameLookup(_STD_STRING& out, BNNameType& functionType);
+ void DemangleNameTypeString(_STD_STRING& out);
+ void DemangleNameTypeBackref(_STD_STRING& out, const _STD_VECTOR<_STD_STRING>& backrefList);
+ void DemangleName(BN::QualifiedName& nameList,
BNNameType& classFunctionType,
BackrefList& nameBackrefList);
- BinaryNinja::Ref<BinaryNinja::CallingConvention> GetCallingConventionForType(BNCallingConventionName ccName);
+ BN::Ref<BN::CallingConvention> GetCallingConventionForType(BNCallingConventionName ccName);
BNCallingConventionName DemangleCallingConvention();
- BinaryNinja::TypeBuilder DemangleFunction(BNNameType classFunctionType, bool pointerSuffix, BackrefList& varList, int funcClass = NoneFunctionClass);
- BinaryNinja::TypeBuilder DemangleData();
+ BN::TypeBuilder DemangleFunction(BNNameType classFunctionType, bool pointerSuffix, BackrefList& varList, int funcClass = NoneFunctionClass);
+ BN::TypeBuilder DemangleData();
void DemangleNameTypeRtti(BNNameType& classFunctionType,
BackrefList& nameBackrefList,
- std::string& out);
- BinaryNinja::TypeBuilder DemangleVTable();
- BinaryNinja::TypeBuilder DemanagleRTTI(BNNameType classFunctionType);
- std::string DemangleTemplateInstantiationName(BackrefList& nameBackrefList);
- std::string DemangleTemplateParams(std::vector<BinaryNinja::FunctionParameter>& params, BackrefList& nameBackrefList, std::string& out);
- std::string DemangleUnqualifiedSymbolName(BinaryNinja::QualifiedName& nameList, BackrefList& nameBackrefList, BNNameType& classFunctionType);
- BinaryNinja::TypeBuilder DemangleString();
- BinaryNinja::TypeBuilder DemangleTypeInfoName();
+ _STD_STRING& out);
+ BN::TypeBuilder DemangleVTable();
+ BN::TypeBuilder DemanagleRTTI(BNNameType classFunctionType);
+ _STD_STRING DemangleTemplateInstantiationName(BackrefList& nameBackrefList);
+ _STD_STRING DemangleTemplateParams(_STD_VECTOR<BN::FunctionParameter>& params, BackrefList& nameBackrefList, _STD_STRING& out);
+ _STD_STRING DemangleUnqualifiedSymbolName(BN::QualifiedName& nameList, BackrefList& nameBackrefList, BNNameType& classFunctionType);
+ BN::TypeBuilder DemangleString();
+ BN::TypeBuilder DemangleTypeInfoName();
public:
struct DemangleContext
{
- BinaryNinja::TypeBuilder type;
+ BN::TypeBuilder type;
BNMemberAccess access;
BNMemberScope scope;
};
- Demangle(BinaryNinja::Architecture* arch, std::string mangledName);
- Demangle(BinaryNinja::Ref<BinaryNinja::BinaryView> view, std::string mangledName);
- Demangle(BinaryNinja::Ref<BinaryNinja::Platform> platform, std::string mangledName);
+ Demangle(BN::Architecture* arch, _STD_STRING mangledName);
+ Demangle(BN::Ref<BN::BinaryView> view, _STD_STRING mangledName);
+ Demangle(BN::Ref<BN::Platform> platform, _STD_STRING mangledName);
DemangleContext DemangleSymbol();
- BinaryNinja::QualifiedName GetVarName() const { return m_varName; }
+ BN::QualifiedName GetVarName() const { return m_varName; }
// Be careful not to accidentally implicitly cast a BinaryView* to a bool
- static bool DemangleMS(BinaryNinja::Architecture* arch, const std::string& mangledName, BinaryNinja::Ref<BinaryNinja::Type>& outType,
- BinaryNinja::QualifiedName& outVarName, const BinaryNinja::Ref<BinaryNinja::BinaryView>& view);
- static bool DemangleMS(BinaryNinja::Architecture* arch, const std::string& mangledName, BinaryNinja::Ref<BinaryNinja::Type>& outType,
- BinaryNinja::QualifiedName& outVarName, BinaryNinja::BinaryView* view);
- static bool DemangleMS(BinaryNinja::Architecture* arch, const std::string& mangledName, BinaryNinja::Ref<BinaryNinja::Type>& outType,
- BinaryNinja::QualifiedName& outVarName);
+ static bool DemangleMS(BN::Architecture* arch, const _STD_STRING& mangledName, BN::Ref<BN::Type>& outType,
+ BN::QualifiedName& outVarName, const BN::Ref<BN::BinaryView>& view);
+ static bool DemangleMS(BN::Architecture* arch, const _STD_STRING& mangledName, BN::Ref<BN::Type>& outType,
+ BN::QualifiedName& outVarName, BN::BinaryView* view);
+ static bool DemangleMS(BN::Architecture* arch, const _STD_STRING& mangledName, BN::Ref<BN::Type>& outType,
+ BN::QualifiedName& outVarName);
- static bool DemangleMS(const std::string& mangledName, BinaryNinja::Ref<BinaryNinja::Type>& outType,
- BinaryNinja::QualifiedName& outVarName, const BinaryNinja::Ref<BinaryNinja::BinaryView>& view);
- static bool DemangleMS(const std::string& mangledName, BinaryNinja::Ref<BinaryNinja::Type>& outType,
- BinaryNinja::QualifiedName& outVarName, BinaryNinja::BinaryView* view);
+ static bool DemangleMS(const _STD_STRING& mangledName, BN::Ref<BN::Type>& outType,
+ BN::QualifiedName& outVarName, const BN::Ref<BN::BinaryView>& view);
+ static bool DemangleMS(const _STD_STRING& mangledName, BN::Ref<BN::Type>& outType,
+ BN::QualifiedName& outVarName, BN::BinaryView* view);
};