A basic block instruction.

Method __init__
Method comment Get the instruction comment.
Method set_comment Set the instruction comment.
Method index Property: Instruction index in the basic block.
Method address Property: The instruction virtual address.
Method size Property: The instruction size in bytes.
Method prefixes Property: The instruction prefixes.
Method mnemonic Property: The instruction mnemonic.
Method operands The instruction operands.
Method operand Get operand by index.
Method raw_bytes Property: Return a bytearray containing the raw, still assembled instruction.
Method __repr__ Undocumented
Method _rvn Undocumented
Method _instr Undocumented
def __init__(self, block, index):
ParametersblockA BasicBlock instance.
indexThe instruction index in its basic block.
RaisesValueErrorif the instruction index is greater than the size of the basic block.
@property
def _rvn(self):
Undocumented
@property
def _instr(self):
Undocumented
def comment(self):

Get the instruction comment.

Although this object is cached like the others, its value is still updated by the local modifications performed using this instance's set_comment method.

def set_comment(self, text):

Set the instruction comment.

To prevent accidental loss of data, you cannot modify the comment of an instruction if the comment of any instruction in this instruction's basic block was modified by another connection since you created this Instruction instance. If you get a ConcurrentAccessError when trying to call this method, then perform the following step to refresh your Instruction instance:

  1. Refresh your project instance: project.refresh()
  2. Re-obtain your trace: project.trace(your_trace_name)
  3. Re-obtain your point: point = trace.point(sequence_index, instruction_index)
  4. Re-obtain your instruction: instruction = point.instruction

Of course, you should check how the comments were modified by the other connection before trying to modify them again.

Raisesreven_api.ServiceNotAllowedDuringExecutionErrorIf this method is called during the execution.
RuntimeErrorIf the connection is lost, in case of bad input, or in case of internal service error.
ConcurrentAccessErrorIf the method is called after the comments where modified by another connection, without any prior refresh of the comment cache.
@property
def index(self):

Property: Instruction index in the basic block.

@property
def address(self):

Property: The instruction virtual address.

@property
def size(self):

Property: The instruction size in bytes.

@property
def prefixes(self):

Property: The instruction prefixes.

@property
def mnemonic(self):

Property: The instruction mnemonic.

def operands(self):

The instruction operands.

Returnsa list of strings representing the operands
def operand(self, index):

Get operand by index.

ReturnsThe operand at the specified index. If 0 > index > len(operands), None.
@property
def raw_bytes(self):

Property: Return a bytearray containing the raw, still assembled instruction.

def __repr__(self):
Undocumented
API Documentation for reven, generated by pydoctor at 2018-06-06 16:31:21.