microprobe.code.address.InstructionAddress

class InstructionAddress(base_address: Variable | str | None = None, displacement: int = 0, instruction: Instruction | None = None)[source]

Bases: Address

Class to represent an instruction address.

__init__(base_address: Variable | str | None = None, displacement: int = 0, instruction: Instruction | None = 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: Instruction)[source]

Sets the instruction to which this address is pointing.

Parameters:

instruction (Instruction) – Target instruction

property base_address: Variable | str | None

Base address of the address (str)

check_alignment(align: int)

Check if the address is aligned to align

copy()

Returns a copy of the address.

property displacement

Displacement of the address (int)