reven2.address.LogicalAddressSegmentIndex(_AbstractAddress)
class documentationreven2.address
(View In Hierarchy)
Representation of a logical address based on a segment index.
>>> addr = address.LogicalAddressSegmentIndex(0x33, 0xfffff800c99455b0L) >>> hex(addr.offset) '0xfffff800c99455b0L' >>> print(addr) 0x33:0xfffff800c99455b0
Method | __init__ | Initializes a LogicalAddress from an offset and a segment
index. |
Method | segment_index | Property: The segment index 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 LogicalAddressSegmentIndex to its high level
representation. |
Method | _is_comparable | Whether two address objects are comparable or not. |
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
index.
>>> print(address.LogicalAddressSegmentIndex(0x33, 0x10)) 0x33:0x10 >>> print(address.LogicalAddressSegmentIndex(0x33, 256)) 0x33:0x100 >>> print(address.LogicalAddressSegmentIndex(0x10, 0xfffff800c99455b0L)) 0x10:0xfffff800c99455b0
Parameters | segment_index | The segment index of the logical address. (type: 16 bits integer ) |
offset | The offset of the logical address. (type: integer ) | |
Raises | TypeError | if offset or segment_index are not integer. |
ValueError | if `offset` or `segment_index` can not be converted to an
integer or `segment_index` is bigger than a 16 bits integer. |
Property: The segment index of the logical address.
>>> address.LogicalAddressSegmentIndex(0x33, 0xfffff800c99455b0L).segment_index 0x33
Returns | An integer . |
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 LogicalAddressSegmentIndex
to its high level
representation.
Returns | A reven_api.VirtualAddress . |