reven.api.Point(object)
class documentationreven.api
(View In Hierarchy)
A point in a trace.
Execution points allow accessing the various machine states reached
during an execution. Each Point
provides an access to
the machine's Cpu
context and
Memory
. Generally speaking
a point corresponds to the execution of a CPU instruction, but a point may
also be generated on interruptions triggered by external devices.
Internally reven manages execution points through a pair of indexes:
This object abstracts away this implementation detail through the Point
interface. This allows
the user to transparently use iterators on a trace without bothering with
dynamic basic block (aka sequence) consideration.
Method | __init__ | |
Method | memory_accesses | The memory accesses performed by the instruction. |
Method | trace | Property: The trace this point belongs to. |
Method | memory | The memory at this point in the trace. |
Method | cpu | The CPU at this point in the trace. |
Method | sequence_index | Property: The sequence index in the trace (number of basic block executed). |
Method | instruction_index | Property: The instruction index in the point basic block. |
Method | previous | The previously executed trace point. |
Method | next | The next executed trace point. |
Method | comment | The comments at this point. |
Method | push_comment | |
Method | instruction | Property: The point instruction. |
Method | basic_block | Property: The point basic block. |
Method | symbol | Property: The point symbol. |
Method | previous_sequence | Get the first point of the previous sequence. |
Method | next_sequence | Get the first point of the next sequence. |
Method | __lt__ | |
Method | __eq__ | Undocumented |
Method | __ne__ | Undocumented |
Method | __gt__ | |
Method | __ge__ | |
Method | __le__ | |
Method | __repr__ | Undocumented |
Method | _rvn | Undocumented |
Method | _rvn_point | Undocumented |
Method | _sequence |
Parameters | trace | The point trace. |
index | The sequence index. | |
instruction_index | The instruction index. | |
Raises | ValueError | if the sequence index is negative or greater than the sequence count in the trace. |
ValueError | if the instruction index is negative or greater than the instruction count in the sequence. |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
The memory accesses performed by the instruction.
Returns | A list of MemoryAccess objects. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
The memory at this point in the trace.
Parameters | default_segment | The default segment selector value used to access data by logical address
in this memory object. If none, will be the current value of
ds . |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
The CPU at this point in the trace.
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Property: The sequence index in the trace (number of basic block executed).
The previously executed trace point.
Returns | The previous point or None if this is the first point in the
trace. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
The next executed trace point.
Returns | The next point or None if this is the last point in the trace. |
The comments at this point.
This is similar to a static instruction's comment, but is only displayed at this point. Note the following current limitations on dynamic comments:
In its current state, the dynamic comment feature is experimental, and its use is discouraged.
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Get the first point of the previous sequence.
Returns | the first point of the previous sequence, or None if this
point belongs to the first sequence. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Get the first point of the next sequence.
Returns | the first point of the next sequence or None if this point
belongs to the last sequence. | |
Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |