microprobe.code.address.InstructionAddress

class InstructionAddress(base_address=None, displacement=0, instruction=None)[source]

Bases: Address

Class to represent an instruction address.

__init__(base_address=None, displacement=0, instruction=None)[source]
Parameters:
  • base_address – (Default value = None)

  • displacement – (Default value = 0)

  • instruction – (Default value = None)

Methods

__init__([base_address, displacement, ...])

param base_address:

(Default value = None)

check_alignment(align)

Check if the address is aligned to align

copy()

Returns a copy of the address.

set_target_instruction(instruction)

Sets the instruction to which this address is pointing.

Attributes

base_address

Base address of the address (str)

displacement

Displacement of the address (int)

target_instruction

Target instruction (Instruction)




property target_instruction

Target instruction (Instruction)

set_target_instruction(instruction)[source]

Sets the instruction to which this address is pointing.

Parameters:

instruction (Instruction) – Target instruction

property base_address

Base address of the address (str)

check_alignment(align)

Check if the address is aligned to align

copy()

Returns a copy of the address.

property displacement

Displacement of the address (int)