class Location(object):
Useful OSSI information related to an address, such as the nearest symbol or the base address.
Must not be directly constructed but retrieved through the following examples.
>>> # From a Transition >>> transition.context_before().ossi.location(addr) # from the context before the transition >>> transition.context_after().ossi.location(addr) # from the context after the transition
>>> # From a Context >>> context.ossi.location() # from the current value in the pc register >>> context.ossi.location(addr) # from an address
Method | __init__ |
Undocumented |
Property | base_address |
Property: The address where the binary is loaded in memory (aka base address). |
Property | rva |
Property: The relative virtual address (rva) inside the binary. |
Property | address |
Property: The address in memory. |
Property | symbol_offset |
Property: The offset from the begining of the nearest symbol. |
Property | symbol |
Property: The nearest symbol, if exists. |
Property | binary |
Property: The related binary. |
Method | __str__ |
Undocumented |
Method | __repr__ |
Undocumented |
Instance Variable | _datasource |
Undocumented |
Instance Variable | _symbol_context |
Undocumented |
Property: The address where the binary is loaded in memory (aka base address).
>>> hex(location.base_address) '0xfffff800c9801000L'
Returns | An integer . |
Property: The relative virtual address (rva) inside the binary.
The rva is the offset from the base address of the binary loaded in memory.
>>> hex(symbol.rva) '0x1445b0'
Returns | An integer . |
Property: The address in memory.
>>> hex(location.address) '0xfffff800c99455b0L'
Returns | An integer . |
Property: The offset from the begining of the nearest symbol.
>>> hex(symbol.offset) '0x10'
Returns | An integer . | |
Raises | RuntimeError | if the location is not linked to a symbol. |
Property: The nearest symbol, if exists.
If the location is not linked to a symbol, None
is returned.
>>> location.symbol.name 'KiIsrLinkage' >>> hex(location.symbol.rva) '0x1445a0' >>> print(location.symbol) 'ntoskrnl!KiIsrLinkage'
Returns | A Symbol or None |
Property: The related binary.
>>> print(location.binary) 'c:/windows/system32/ntoskrnl.exe'
Returns | A Binary . |