microprobe.code.ins.Instruction¶
-
class
Instruction[source]¶ Bases:
microprobe.utils.misc.PickableClass to represent an instruction
Methods
__init__()add_allow_register(reg)param reg: add_comment(comment)param comment: add_decorator(name, value)param key: decorator name allows(reg)param reg: assembly()Assembly representation of the instruction. binary()Binary representation of the instruction. check_context(context)param context: copy()Return a copy of the instruction. memory_operands()Instruction memory operands. operand_by_field(fieldname)param fieldname: operand_fields()Instruction field names of the operands. operands()Instruction operands. register_context_callback(key, …)param key: rm_decorator(name)set_address(address)param address: set_arch_type(instrtype)param instrtype: set_label(label)param label: set_operands(values[, context])param values: sets()Return the list of registers set by the instruction. unset_address()Unset instruction address. uses()Return the list of registers used by the instruction. Attributes
addressInstruction address ( InstructionAddress)allowed_regsList of allowed registers of the instructon. architecture_typeInstruction architecture type ( InstructionType).commentsList of comments of the instruction ( list).context_callbacksReturns the list of context callbacks registered. decoratorsInstruction decorators ( dict).labelInstruction label ( str).
-
register_context_callback(key, checking_function, fixing_function)[source]¶ Parameters: - key –
- checking_function –
- fixing_function –
-
context_callbacks¶ Returns the list of context callbacks registered.
-
architecture_type¶ Instruction architecture type (
InstructionType).
-
copy()[source]¶ Return a copy of the instruction.
Return type: Instruction
-
comments¶ List of comments of the instruction (
list).
-
allowed_regs¶ List of allowed registers of the instructon.
-
address¶ Instruction address (
InstructionAddress)
-