class Symbol:
Known subclasses: reven2.ossi.ossi.DataSymbol
, reven2.ossi.ossi.FunctionSymbol
Models 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 |
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 |
Property: The name of the symbol as it is found in the binary or the debug file without any transformation. |
Instance Variable | _binary |
Undocumented |
Instance Variable | _datasource |
Undocumented |
Instance Variable | _symbol |
Undocumented |
Compares the instance for equality with an object.
- if the object is not a
Symbol
, return False.
Parameters | |
other:_Any | Undocumented |
Returns | |
bool | Undocumented |
def __init__(self, _datasource, _binary_id, _symbol):
reven2.ossi.ossi.DataSymbol
, reven2.ossi.ossi.FunctionSymbol
Undocumented
Parameters | |
_datasource:DataSource | Undocumented |
_binarystr | Undocumented |
_symbol:_reven_api.Symbol | Undocumented |
Compares the instance for equality with an object.
- if the object is not a
Symbol
, returns True.
Parameters | |
other:_Any | Undocumented |
Returns | |
bool | Undocumented |
Returns the nicely printable string representation of this instance.
Returns | |
str | Undocumented |
Property: The binary in which the symbol have been declared.
Examples
>>> print(symbol.binary) 'c:/windows/system32/ntoskrnl.exe'
Information
Returns | |
A Binary . |
demangled_name:
_Optional[ str]
=
reven2.ossi.ossi.FunctionSymbol
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. |
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 ). |
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. |
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. |