class documentation

class LogicalAddress(_AbstractAddress):

View In Hierarchy

Representation of a logical address based on a segment register.

Examples

>>> addr = address.LogicalAddress(0xfffff800c99455b0)
>>> hex(addr.offset)
'0xfffff800c99455b0'
>>> print(addr)
ds:0xfffff800c99455b0
Method __init__ Initializes a LogicalAddress from an offset and a segment register.
Property 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
Instance Variable _offset Undocumented
Instance Variable _segment_register Undocumented
Instance Variable _formatter 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
Method _address_data Undocumented

Inherited from _AbstractAddress:

Property 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
Method format_as_html This method gets an html formatting string representation for this class instance.
Class Variable _unique_count Undocumented
Class Method _unique_id Undocumented
Static Method _unpack_segment_register Undocumented
Static Method _unpack Unpack a low level representation of an address to its high level representation.
Method _repr_html_ Representation used by Jupyter Notebook when an instance of the address classes is displayed in a cell.
def __init__(self, offset, segment_register=None, formatter=None):

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.

Examples

>>> print(address.LogicalAddress(0x10))
ds:0x10
>>> print(address.LogicalAddress(256))
ds:0x100
>>> print(address.LogicalAddress(0xfffff800c99455b0))
ds:0xfffff800c99455b0
>>> print(address.LogicalAddress(0xfffff800c99455b0, arch.x64.cs))
cs:0xfffff800c99455b0

Information

ParametersoffsetThe offset of the logical address. (type: integer)
segment_registerThe segment register of the logical address. (type: arch.register.Register)
formatterThe formatter for this address (type: Formatter)
RaisesTypeErrorif `offset` is not an integer or `segment_register` is not a arch.register.Register.
ValueErrorif `offset` can not be converted to an integer or `segment_register` is not a segment register.
_offset =

Undocumented

_segment_register =

Undocumented

_formatter =

Undocumented

@property
segment_register =

Property: The segment register of the logical address.

Examples

>>> address.LogicalAddress(0xfffff800c99455b0).segment_register
Register(x64.ds)
>>> address.LogicalAddress(0xfffff800c99455b0, arch.x64.cs).segment_register
Register(x64.cs)

Information

ReturnsA arch.register.Register.
def translate(self, context):

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

Information

ParameterscontextThe reven2.trace.Context at which the translation should be attempted
ReturnsA PhysicalAddress if the current virtual address is mapped at the specified context, otherwise None
def _pack(self):

Pack a LogicalAddress to its high level representation.

Information

ReturnsA reven_api.VirtualAddress.
def _is_comparable(self, other):

Whether two address objects are comparable or not.

def __repr__(self):

Undocumented

def __str__(self):

Undocumented

def _pack_segment_register(self):

Undocumented

def _address_data(self):

Undocumented

API Documentation for reven2, generated by pydoctor 21.2.2 at 2022-03-08 15:23:15.