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 of the address (
str
)Displacement of the address (
int
)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
- copy()
Returns a copy of the address.