Loading...
Searching...
No Matches
Demangle

Detailed Description

Functions

bool BinaryNinja::DemangleGeneric (Ref< Architecture > arch, const std::string &mangledName, Ref< Type > &outType, QualifiedName &outVarName, Ref< BinaryView > view=nullptr, const bool simplify=false)
 Attempt to demangle a mangled name, trying all relevant demanglers and using whichever one accepts it.
 
bool BinaryNinja::DemangleLLVM (const std::string &mangledName, QualifiedName &outVarName, const bool simplify=false)
 Demangles using LLVM's demangler.
 
bool BinaryNinja::DemangleLLVM (const std::string &mangledName, QualifiedName &outVarName, BinaryView *view)
 Demangles using LLVM's demangler.
 
bool BinaryNinja::DemangleMS (Architecture *arch, const std::string &mangledName, Ref< Type > &outType, QualifiedName &outVarName, const bool simplify=false)
 Demangles a Microsoft Visual Studio C++ name.
 
bool BinaryNinja::DemangleMS (Architecture *arch, const std::string &mangledName, Ref< Type > &outType, QualifiedName &outVarName, BinaryView *view)
 Demangles a Microsoft Visual Studio C++ name.
 
bool BinaryNinja::DemangleGNU3 (Ref< Architecture > arch, const std::string &mangledName, Ref< Type > &outType, QualifiedName &outVarName, const bool simplify=false)
 Demangles a GNU3 name.
 
bool BinaryNinja::DemangleGNU3 (Ref< Architecture > arch, const std::string &mangledName, Ref< Type > &outType, QualifiedName &outVarName, BinaryView *view)
 Demangles a GNU3 name.
 
bool BinaryNinja::IsGNU3MangledString (const std::string &mangledName)
 Determines if a symbol name is a mangled GNU3 name.
 
std::string BinaryNinja::SimplifyToString (const std::string &input)
 
std::string BinaryNinja::SimplifyToString (const QualifiedName &input)
 
QualifiedName BinaryNinja::SimplifyToQualifiedName (const std::string &input, bool simplify)
 
QualifiedName BinaryNinja::SimplifyToQualifiedName (const QualifiedName &input)
 

Function Documentation

◆ DemangleGeneric()

bool BinaryNinja::DemangleGeneric ( Ref< Architecture > arch,
const std::string & mangledName,
Ref< Type > & outType,
QualifiedName & outVarName,
Ref< BinaryView > view = nullptr,
const bool simplify = false )

Attempt to demangle a mangled name, trying all relevant demanglers and using whichever one accepts it.

See also
Demangler::Demangle for a discussion on which demangler will be used.
Parameters
[in]archArchitecture for the symbol. Required for pointer and integer sizes.
[in]mangledNamea mangled Microsoft Visual Studio C++ name
[out]outTypePointer to Type to output
[out]outVarNameQualifiedName reference to write the output name to.
[in]view(Optional) view of the binary containing the mangled name
[in]simplify(Optional) Whether to simplify demangled names.
Returns
True if the name was demangled and written to the out* parameters

◆ DemangleLLVM() [1/2]

bool BinaryNinja::DemangleLLVM ( const std::string & mangledName,
QualifiedName & outVarName,
const bool simplify = false )

Demangles using LLVM's demangler.

Parameters
[in]mangledNamea mangled (msvc/itanium/rust/dlang) name
[out]outVarNameQualifiedName reference to write the output name to.
[in]simplifyWhether to simplify demangled names.
Returns
True if the name was demangled and written to the out* parameters

◆ DemangleLLVM() [2/2]

bool BinaryNinja::DemangleLLVM ( const std::string & mangledName,
QualifiedName & outVarName,
BinaryView * view )

Demangles using LLVM's demangler.

Parameters
[in]mangledNamea mangled (msvc/itanium/rust/dlang) name
[out]outVarNameQualifiedName reference to write the output name to.
[in]viewView to check the analysis.types.templateSimplifier for
Returns
True if the name was demangled and written to the out* parameters

◆ DemangleMS() [1/2]

bool BinaryNinja::DemangleMS ( Architecture * arch,
const std::string & mangledName,
Ref< Type > & outType,
QualifiedName & outVarName,
const bool simplify = false )

Demangles a Microsoft Visual Studio C++ name.

Parameters
[in]archArchitecture for the symbol. Required for pointer and integer sizes.
[in]mangledNamea mangled Microsoft Visual Studio C++ name
[out]outTypeReference to Type to output
[out]outVarNameQualifiedName reference to write the output name to.
[in]simplifyWhether to simplify demangled names.
Returns
True if the name was demangled and written to the out* parameters

◆ DemangleMS() [2/2]

bool BinaryNinja::DemangleMS ( Architecture * arch,
const std::string & mangledName,
Ref< Type > & outType,
QualifiedName & outVarName,
BinaryView * view )

Demangles a Microsoft Visual Studio C++ name.

This overload will use the view's "analysis.types.templateSimplifier" setting to determine whether to simplify the mangled name.

Parameters
[in]archArchitecture for the symbol. Required for pointer and integer sizes.
[in]mangledNamea mangled Microsoft Visual Studio C++ name
[out]outTypeReference to Type to output
[out]outVarNameQualifiedName reference to write the output name to.
[in]viewView to check the analysis.types.templateSimplifier for
Returns
True if the name was demangled and written to the out* parameters

◆ DemangleGNU3() [1/2]

bool BinaryNinja::DemangleGNU3 ( Ref< Architecture > arch,
const std::string & mangledName,
Ref< Type > & outType,
QualifiedName & outVarName,
const bool simplify = false )

Demangles a GNU3 name.

Parameters
[in]archArchitecture for the symbol. Required for pointer and integer sizes.
[in]mangledNamea mangled GNU3 name
[out]outTypeReference to Type to output
[out]outVarNameQualifiedName reference to write the output name to.
[in]simplifyWhether to simplify demangled names.
Returns
True if the name was demangled and written to the out* parameters

◆ DemangleGNU3() [2/2]

bool BinaryNinja::DemangleGNU3 ( Ref< Architecture > arch,
const std::string & mangledName,
Ref< Type > & outType,
QualifiedName & outVarName,
BinaryView * view )

Demangles a GNU3 name.

This overload will use the view's "analysis.types.templateSimplifier" setting to determine whether to simplify the mangled name.

Parameters
[in]archArchitecture for the symbol. Required for pointer and integer sizes.
[in]mangledNamea mangled GNU3 name
[out]outTypeReference to Type to output
[out]outVarNameQualifiedName reference to write the output name to.
[in]viewView to check the analysis.types.templateSimplifier for
Returns
True if the name was demangled and written to the out* parameters

◆ IsGNU3MangledString()

bool BinaryNinja::IsGNU3MangledString ( const std::string & mangledName)

Determines if a symbol name is a mangled GNU3 name.

Parameters
[in]mangledNamea potentially mangled name

◆ SimplifyToString() [1/2]

std::string BinaryNinja::SimplifyToString ( const std::string & input)

◆ SimplifyToString() [2/2]

string BinaryNinja::SimplifyToString ( const QualifiedName & input)

◆ SimplifyToQualifiedName() [1/2]

QualifiedName BinaryNinja::SimplifyToQualifiedName ( const std::string & input,
bool simplify )

◆ SimplifyToQualifiedName() [2/2]

QualifiedName BinaryNinja::SimplifyToQualifiedName ( const QualifiedName & input)