microprobe.code.ins.InstructionMemoryOperandValue

class InstructionMemoryOperandValue(memory_operand_descriptor, operand_values, length_values)[source]

Bases: microprobe.utils.misc.Pickable

Class to represent an instruction operand value

__init__(memory_operand_descriptor, operand_values, length_values)[source]
Parameters:
  • memory_operand_descriptor
  • operand_values
  • length_values

Methods

__init__(memory_operand_descriptor, …)
param memory_operand_descriptor:
 
alignment() Required alignment of the memory operand (:int).
possible_addresses(dummy_context)
param dummy_context:
 
possible_lengths(context)
param context:
register_mem_operand_callback(set_address, …)
param set_address:
 
set_address(address, context)
param address:
set_alignment(alignment) Set the required alignment of the memory operand.
set_forbidden_address_range(min_address, …)
param min_address:
 
set_length(length, context)
param length:
set_possible_addresses(addreses, dummy_context) Set the possible addresses for the memory operand.
set_possible_lengths(lengths, dummy_context)
param lengths:
sets() Return the list of registers set by the memory operand.
unset_forbidden_address_range() Unset the forbiddend address range.
unset_possible_addresses() Unset the possible addresses of the memory operand.
unset_possible_lengths() Unset the possible lengths of the memory operand.
update_address(address)
param address:
update_address_from_operands([context])
param context:
uses() Return the list of registers used by the memory operand.

Attributes

address Address of the memory operand (Address).
descriptor Descriptor of the memory operand (OperandDescriptor).
length Length of the memory operand (:int).
operands Memory operand values (list of InstructionOperandValue).
variable_length Variable length value(bool).



register_mem_operand_callback(set_address, set_length, unset_address, unset_length)[source]
Parameters:
  • set_address
  • set_length
  • unset_address
  • unset_length
address

Address of the memory operand (Address).

descriptor

Descriptor of the memory operand (OperandDescriptor).

length

Length of the memory operand (:int).

operands

Memory operand values (list of InstructionOperandValue).

variable_length

Variable length value(bool).

possible_lengths(context)[source]
Parameters:context
possible_addresses(dummy_context)[source]
Parameters:dummy_context
set_possible_addresses(addreses, dummy_context)[source]

Set the possible addresses for the memory operand.

Parameters:
  • addreses
  • dummy_context
unset_possible_addresses()[source]

Unset the possible addresses of the memory operand.

set_alignment(alignment)[source]

Set the required alignment of the memory operand.

Parameters:alignment (int) – alignment
alignment()[source]

Required alignment of the memory operand (:int).

set_possible_lengths(lengths, dummy_context)[source]
Parameters:
  • lengths
  • dummy_context
unset_possible_lengths()[source]

Unset the possible lengths of the memory operand.

set_forbidden_address_range(min_address, max_address, dummy_context)[source]
Parameters:
  • min_address
  • max_address
  • dummy_context
set_length(length, context)[source]
Parameters:
  • length
  • context
update_address(address)[source]
Parameters:
  • address
  • context
set_address(address, context)[source]
Parameters:
  • address
  • context
update_address_from_operands(context=None)[source]
Parameters:context
unset_forbidden_address_range()[source]

Unset the forbiddend address range.

sets()[source]

Return the list of registers set by the memory operand.

Return type:list of Register
uses()[source]

Return the list of registers used by the memory operand.

Return type:list of Register