Demangle a raw name into a Type and QualifiedName. The result of this function is a (Type, QualifiedName) tuple for the demangled name's details. Any unresolved named types referenced by the resulting Type will be created as empty structures or void typedefs in the view, if the result i
( self, arch: Architecture, name: str, view: Optional['binaryview.BinaryView'] = None )
| 420 | raise NotImplementedError() |
| 421 | |
| 422 | def demangle( |
| 423 | self, |
| 424 | arch: Architecture, |
| 425 | name: str, |
| 426 | view: Optional['binaryview.BinaryView'] = None |
| 427 | ) -> Optional[Tuple['types.Type', 'types.QualifiedName']]: |
| 428 | """ |
| 429 | Demangle a raw name into a Type and QualifiedName. |
| 430 | |
| 431 | The result of this function is a (Type, QualifiedName) tuple for the demangled |
| 432 | name's details. |
| 433 | |
| 434 | Any unresolved named types referenced by the resulting Type will be created as |
| 435 | empty structures or void typedefs in the view, if the result is used on |
| 436 | a data structure in the view. Given this, the call to :py:func:`demangle` |
| 437 | should NOT cause any side-effects creating types in the view trying to resolve this |
| 438 | and instead just return a type with unresolved named type references. |
| 439 | |
| 440 | The most recently registered demangler that claims a name is a mangled string |
| 441 | (returns true from :py:func:`is_mangled_string`), and then returns a value from |
| 442 | this function will determine the result of a call to :py:func:`demangle_generic`. |
| 443 | If this call returns None, the next most recently used demangler(s) will be tried instead. |
| 444 | |
| 445 | If the mangled name has no type information, but a name is still possible to extract, |
| 446 | this function may return a successful (None, <name>) result, which will be accepted. |
| 447 | |
| 448 | :param arch: Architecture for context in which the name exists, eg for pointer sizes |
| 449 | :param name: Raw mangled name |
| 450 | :param view: (Optional) BinaryView context in which the name exists, eg for type lookup |
| 451 | :return: Tuple of (Type, Name) if successful, None if not. Type may be None if only |
| 452 | a demangled name can be recovered from the raw name. |
| 453 | """ |
| 454 | raise NotImplementedError() |
| 455 | |
| 456 | |
| 457 | class CoreDemangler(Demangler): |
no outgoing calls
no test coverage detected