class documentation

class LogicalAddressSegmentIndex(_AbstractAddress):

View In Hierarchy

Representation of a logical address based on a segment index.

Examples

>>> addr = address.LogicalAddressSegmentIndex(0x33, 0xfffff800c99455b0)
>>> hex(addr.offset)
'0xfffff800c99455b0'
>>> print(addr)
0x33:0xfffff800c99455b0
Method __hash__ Returns the hash for this value.
Method __init__ Initializes a LogicalAddress from an offset and a segment index.
Method __repr__ Undocumented
Method __str__ Undocumented
Method translate Translates this virtual address to a physical address, if it is mapped at the specified context.
Property segment_index Property: The segment index of the logical address.
Method _address_data Undocumented
Method _is_comparable Whether two address objects are comparable or not.
Method _pack Pack a LogicalAddressSegmentIndex to its high level representation.
Instance Variable _index Undocumented

Inherited from _AbstractAddress:

Method __add__ Undocumented
Method __and__ Undocumented
Method __eq__ Compares the instance for equality with an object.
Method __ge__ Undocumented
Method __gt__ Undocumented
Method __iadd__ Undocumented
Method __iand__ Undocumented
Method __ior__ Undocumented
Method __isub__ Undocumented
Method __le__ Undocumented
Method __lt__ Undocumented
Method __ne__ Compares the instance for equality with an object.
Method __or__ Undocumented
Method __sub__ Undocumented
Method format_as_html This method gets an html formatting string representation for this class instance.
Method offset.setter Undocumented
Property offset Property: The offset of the address.
Class Method _unique_id Undocumented
Static Method _unpack Unpack a low level representation of an address to its high level representation.
Static Method _unpack_segment_register Undocumented
Method _repr_html_ Representation used by Jupyter Notebook when an instance of the address classes is displayed in a cell.
Class Variable _unique_count Undocumented
Instance Variable _formatter Undocumented
Instance Variable _offset Undocumented
def __hash__(self):

Returns the hash for this value.

Returns
intUndocumented
def __init__(self, segment_index, offset, formatter=None):

Initializes a LogicalAddress from an offset and a segment index.

Examples

>>> print(address.LogicalAddressSegmentIndex(0x33, 0x10))
0x33:0x10
>>> print(address.LogicalAddressSegmentIndex(0x33, 256))
0x33:0x100
>>> print(address.LogicalAddressSegmentIndex(0x10, 0xfffff800c99455b0))
0x10:0xfffff800c99455b0

Information

Parameters
segment_index:16 bits integerThe segment index of the logical address.
offset:integerThe offset of the logical address.
formatter:FormatterThe formatter for this address
Raises
TypeErrorif offset or segment_index are not integer.
ValueErrorif `offset` or `segment_index` can not be converted to an integer or `segment_index` is bigger than a 16 bits integer.
def __repr__(self):

Undocumented

Returns
strUndocumented
def __str__(self):

Undocumented

Returns
strUndocumented
def translate(self, context):

Translates this virtual address to a physical address, if it is mapped at the specified context.

Information

Parameters
context:_ContextThe reven2.trace.Context at which the translation should be attempted
Returns
_Optional[PhysicalAddress]A PhysicalAddress if the current virtual address is mapped at the specified context, otherwise None
@property
segment_index: int =

Property: The segment index of the logical address.

Examples

>>> address.LogicalAddressSegmentIndex(0x33, 0xfffff800c99455b0).segment_index
0x33

Information

Returns
An integer.
def _address_data(self):
def _is_comparable(self, other):

Whether two address objects are comparable or not.

Parameters
other:_AnyUndocumented
Returns
boolUndocumented
def _pack(self):

Pack a LogicalAddressSegmentIndex to its high level representation.

Information

Returns
_reven_api.VirtualAddressA reven_api.VirtualAddress.
_index =

Undocumented