reven2.address.LogicalAddress(_AbstractAddress)
class documentationreven2.address
(View In Hierarchy)
Representation of a logical address based on a segment register.
>>> addr = address.LogicalAddress(0xfffff800c99455b0L) >>> hex(addr.offset) '0xfffff800c99455b0L' >>> print(addr) ds:0xfffff800c99455b0
Method | __init__ | Initializes a LogicalAddress from an offset and a segment
register. |
Method | segment_register | Property: The segment register of the logical address. |
Method | translate | Translates this virtual address to a physical address, if it is mapped at the specified context. |
Method | __repr__ | Undocumented |
Method | __str__ | Undocumented |
Method | _pack | Pack a LogicalAddress to its high level representation. |
Method | _is_comparable | Whether two address objects are comparable or not. |
Method | _pack_segment_register | Undocumented |
Inherited from _AbstractAddress:
Method | offset | Property: The offset of the address. |
Method | __eq__ | Undocumented |
Method | __ne__ | Undocumented |
Method | __lt__ | Undocumented |
Method | __le__ | Undocumented |
Method | __gt__ | Undocumented |
Method | __ge__ | Undocumented |
Method | __iadd__ | Undocumented |
Method | __isub__ | Undocumented |
Method | __add__ | Undocumented |
Method | __sub__ | Undocumented |
Static Method | _unpack_segment_register | Undocumented |
Static Method | _unpack | Unpack a low level representation of an address to its high level representation. |
Initializes a LogicalAddress
from an offset and a segment
register.
If the segment register is set to None
,
arch.x64.ds
is used as segment register to initialize the
logical address.
>>> print(address.LogicalAddress(0x10)) ds:0x10 >>> print(address.LogicalAddress(256)) ds:0x100 >>> print(address.LogicalAddress(0xfffff800c99455b0L)) ds:0xfffff800c99455b0 >>> print(address.LogicalAddress(0xfffff800c99455b0L, arch.x64.cs)) cs:0xfffff800c99455b0
Parameters | offset | The offset of the logical address. (type: integer) |
segment_register | The segment register of the logical address. (type: arch.register.Register ) | |
Raises | TypeError | if `offset` is not an integer or `segment_register` is not a
arch.register.Register . |
ValueError | if `offset` can not be converted to an integer or
`segment_register` is not a segment register. |
Property: The segment register of the logical address.
>>> address.LogicalAddress(0xfffff800c99455b0L).segment_register Register(x64.ds) >>> address.LogicalAddress(0xfffff800c99455b0L, arch.x64.cs).segment_register Register(x64.cs)
Returns | A arch.register.Register . |
Translates this virtual address to a physical address, if it is mapped at the specified context.
Parameters | context | The reven2.trace.Context at
which the translation should be attempted |
Returns | A PhysicalAddress
if the current virtual address is mapped at the specified context,
otherwise None |
Pack a LogicalAddress
to its high level representation.
Returns | A reven_api.VirtualAddress . |