Public Member Functions | |
| CoreDemangler (BNDemangler *demangler) | |
| virtual | ~CoreDemangler ()=default |
| virtual bool | IsMangledString (const std::string &name) |
| Determine if a given name is mangled and this demangler can process it. | |
| virtual bool | Demangle (Ref< Architecture > arch, const std::string &name, Ref< Type > &outType, QualifiedName &outVarName, Ref< BinaryView > view) |
| Demangle a raw name into a Type and QualifiedName. | |
Public Member Functions inherited from BinaryNinja::Demangler | |
| std::string | GetName () const |
Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNDemangler > | |
| StaticCoreRefCountObject () | |
| virtual | ~StaticCoreRefCountObject () |
| BNDemangler * | GetObject () const |
| void | AddRef () |
| void | Release () |
| void | AddRefForRegistration () |
| void | AddRefForCallback () |
| void | ReleaseForCallback () |
Additional Inherited Members | |
Static Public Member Functions inherited from BinaryNinja::Demangler | |
| static void | Register (Demangler *demangler) |
| Register a custom Demangler. | |
| static std::vector< Ref< Demangler > > | GetList () |
| Get the list of currently registered demanglers, sorted by lowest to highest priority. | |
| static Ref< Demangler > | GetByName (const std::string &name) |
| static void | Promote (Ref< Demangler > demangler) |
| Promote a demangler to the highest-priority position. | |
Static Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNDemangler > | |
| static BNDemangler * | GetObject (const StaticCoreRefCountObject *obj) |
Public Attributes inherited from BinaryNinja::StaticCoreRefCountObject< BNDemangler > | |
| std::atomic< int > | m_refs |
| BNDemangler * | m_object |
Protected Member Functions inherited from BinaryNinja::Demangler | |
| Demangler (const std::string &name) | |
| Demangler (BNDemangler *demangler) | |
| virtual | ~Demangler ()=default |
Static Protected Member Functions inherited from BinaryNinja::Demangler | |
| static bool | IsMangledStringCallback (void *ctxt, const char *name) |
| static bool | DemangleCallback (void *ctxt, BNArchitecture *arch, const char *name, BNType **outType, BNQualifiedName *outVarName, BNBinaryView *view) |
| static void | FreeVarNameCallback (void *ctxt, BNQualifiedName *name) |
| BinaryNinja::CoreDemangler::CoreDemangler | ( | BNDemangler * | demangler | ) |
|
virtualdefault |
|
virtual |
Determine if a given name is mangled and this demangler can process it.
The most recently registered demangler that claims a name is a mangled string (returns true from this function), and then returns a value from Demangle will determine the result of a call to DemangleGeneric. Returning True from this does not require the demangler to succeed the call to Demangle, but simply implies that it may succeed.
| name | Raw mangled name string |
Implements BinaryNinja::Demangler.
|
virtual |
Demangle a raw name into a Type and QualifiedName.
Any unresolved named types referenced by the resulting Type will be created as empty structures or void typedefs in the view, if the result is used on a data structure in the view. Given this, the call to Demangle should NOT cause any side-effects creating types in the view trying to resolve this and instead just return a type with unresolved named type references.
The most recently registered demangler that claims a name is a mangled string (returns true from IsMangledString), and then returns a value from this function will determine the result of a call to DemangleGeneric. If this call returns None, the next most recently used demangler(s) will be tried instead.
If the mangled name has no type information, but a name is still possible to extract, this function may return a successful result with outType=nullptr, which will be accepted.
| arch | Architecture for context in which the name exists, eg for pointer sizes |
| name | Raw mangled name |
| outType | Resulting type, if one can be deduced, will be written here. Otherwise nullptr will be written |
| outVarName | Resulting variable name |
| view | (Optional) BinaryView context in which the name exists, eg for type lookup |
Implements BinaryNinja::Demangler.