microprobe.code.ins.Instruction¶
-
class
Instruction
[source]¶ Bases:
microprobe.utils.misc.Pickable
Class 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
address
Instruction address ( InstructionAddress
)allowed_regs
List of allowed registers of the instructon. architecture_type
Instruction architecture type ( InstructionType
).comments
List of comments of the instruction ( list
).context_callbacks
Returns the list of context callbacks registered. decorators
Instruction decorators ( dict
).label
Instruction 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
)
-