class documentation

class Symbol(object):

View In Hierarchy

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 __init__ Undocumented
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.
Property name Property: The name of the symbol.
Property name_only Property: The short, demangled, form of the symbol, if available.
Property prototype Property: The long, demangled, form of the symbol, if available.
Property binary Property: The binary in which the symbol have been declared.
Method __hash__ Undocumented
Method __str__ Undocumented
Method __repr__ Undocumented
Method __eq__ Undocumented
Method __ne__ Undocumented
Method __lt__ Undocumented
Method __le__ Undocumented
Method __gt__ Undocumented
Method __ge__ Undocumented
Instance Variable _datasource Undocumented
Instance Variable _binary_id Undocumented
Instance Variable _symbol Undocumented
def __init__(self, _datasource, _binary_id, _symbol):

Undocumented

_datasource =

Undocumented

_binary_id =

Undocumented

_symbol =

Undocumented

@property
rva =

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

ReturnsAn integer.
(type: int)
@property
source_name =

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

ReturnsA string.
(type: str)
@property
name =

Property: The name of the symbol.

Examples

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

Information

ReturnsIf available, the short demangled form of the symbol (name_only), otherwise the possibly mangled name (source_name).
(type: str)
@property
name_only =

Property: The short, demangled, form of the symbol, if available.

This form only includes the name of the function symbol and omits any attribute (such as calling convention), arguments and return type. However, this form does include the path (namespace) and template arguments.

Depending on the source language, for some symbols this form can be missing entirely.

Examples

>>> symbol.name_only
'COREDEVICEACCESS::COREDEVICEACCESS'

Information

ReturnsEither a string if the name only is available or None.
(type: _Optional[str])
@property
prototype =

Property: The long, demangled, form of the symbol, if available.

This form includes the name of the function symbol, all attributes (such as calling convention), all arguments and the return type that constitute its signature, if available.

Depending on the source language, for some symbols this form can be equal to the name_only form, or missing entirely.

Examples

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

Information

ReturnsEither a string if the prototype is available or None.
(type: _Optional[str])
@property
binary =

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

Examples

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

Information

ReturnsA Binary.
(type: Binary)
def __hash__(self):

Undocumented

def __str__(self):

Undocumented

def __repr__(self):

Undocumented

def __eq__(self, other):

Undocumented

def __ne__(self, other):

Undocumented

def __lt__(self, other):

Undocumented

def __le__(self, other):

Undocumented

def __gt__(self, other):

Undocumented

def __ge__(self, other):

Undocumented

API Documentation for reven2, generated by pydoctor 21.2.2 at 2021-10-01 07:18:12.