class documentation

A modelisation of a static symbol.

Warnings

Must not be directly constructed but retrieved through the following examples. Using an instance of Symbol directly constructed could lead to an AssertionError.

Examples

>>> # From a Transition
>>> transition.context_before().ossi.location().symbol
>>> transition.context_after().ossi.location().symbol
>>> # From a Context
>>> context.location().symbol
>>> # From a Binary
>>> for symbol in binary.symbols:
...     print(symbol)
'toto'
'tata'
Method __eq__ Compares the instance for equality with an object.
Method __ge__ Undocumented
Method __gt__ Undocumented
Method __hash__ Returns the hash for this value.
Method __init__ Undocumented
Method __le__ Undocumented
Method __lt__ Undocumented
Method __ne__ Compares the instance for equality with an object.
Method __str__ Returns the nicely printable string representation of this instance.
Property binary Property: The binary in which the symbol have been declared.
Property demangled_name Property: The full demangled name of the symbol.
Property name Property: The name of the symbol.
Property rva Property: The relative virtual address (rva) inside the binary.
Property source_name Property: The name of the symbol as it is found in the binary or the debug file without any transformation.
Instance Variable _binary_id Undocumented
Instance Variable _datasource Undocumented
Instance Variable _symbol Undocumented
def __eq__(self, other):

Compares the instance for equality with an object.

  • if the object is not a Symbol, return False.
Parameters
other:_AnyUndocumented
Returns
boolUndocumented
def __ge__(self, other):

Undocumented

Parameters
other:SymbolUndocumented
Returns
boolUndocumented
def __gt__(self, other):

Undocumented

Parameters
other:SymbolUndocumented
Returns
boolUndocumented
def __hash__(self):

Returns the hash for this value.

Returns
intUndocumented
@_abc.abstractmethod
def __init__(self, _datasource, _binary_id, _symbol):

Undocumented

Parameters
_datasource:DataSourceUndocumented
_binary_id:strUndocumented
_symbol:_reven_api.SymbolUndocumented
def __le__(self, other):

Undocumented

Parameters
other:SymbolUndocumented
Returns
boolUndocumented
def __lt__(self, other):

Undocumented

Parameters
other:SymbolUndocumented
Returns
boolUndocumented
def __ne__(self, other):

Compares the instance for equality with an object.

  • if the object is not a Symbol, returns True.
Parameters
other:_AnyUndocumented
Returns
boolUndocumented
def __str__(self):

Returns the nicely printable string representation of this instance.

Returns
strUndocumented
@property
binary: Binary =

Property: The binary in which the symbol have been declared.

Examples

>>> print(symbol.binary)
'c:/windows/system32/ntoskrnl.exe'

Information

Returns
A Binary.
@property
demangled_name: _Optional[str] =

Property: The full demangled name of the symbol.

Examples

>>> symbol.demangled_name
'public: __cdecl COREDEVICEACCESS::COREDEVICEACCESS(class DXGDEVICE * const,
                                                    enum _DXGDEVICEACCESS_TYPE,
                                                    unsigned int,bool)'

Information

Returns
Either a string if the full demangled name is available or None.
@property
name: str =

Property: The name of the symbol.

Examples

>>> symbol.name
'COREDEVICEACCESS::COREDEVICEACCESS'

Information

Returns
If available, the short demangled form of the symbol (name_only), otherwise the possibly mangled name (source_name).
@property
rva: int =

Property: The relative virtual address (rva) inside the binary.

The rva is the offset from the base address of the binary loaded in memory.

Examples

>>> hex(symbol.rva)
'0x1445a0'

Information

Returns
An integer.
@property
source_name: str =

Property: The name of the symbol as it is found in the binary or the debug file without any transformation.

The source name can be mangled, depending on the source language of the symbol.

Examples

>>> symbol.source
'??0COREDEVICEACCESS@@QEAA@QEAVDXGDEVICE@@W4_DXGDEVICEACCESS_TYPE@@I_N@Z'

Information

Returns
A string.
_binary_id =

Undocumented

_datasource =

Undocumented

_symbol =

Undocumented