Expand description
Turning a register snapshot into “this instruction, touching these addresses”.
Given the state of a vCPU before an instruction executes, this module
- fetches the instruction bytes from guest memory (
fetch), - decodes them with iced-x86,
- computes the linear address of every memory access the instruction
will make (
plan_accesses), including the implicit ones (stack pushes, string operands, gather elements), and - predicts where execution will go next (
predict_successors), so that the tracer can check that exactly one instruction ran.
Structs§
- Decoded
- A decoded instruction and the bytes it came from.
- Planned
Access - One memory access the instruction is going to attempt.
- Vector
Regs - The SIMD register file, needed only to compute gather/scatter addresses.
Enums§
- Successors
- Where execution can go after this instruction.
Functions§
- fetch
- Fetches and decodes the instruction at the vCPU’s current CS:RIP.
- gpr_
value - Value of a general-purpose register (any width) from a snapshot.
- io_
permission_ accesses - The reads the CPU makes to check I/O permission before
IN,OUT,INSorOUTS. - is_
rep_ string - Is this a REP/REPE/REPNE string instruction?
- may_
clear_ tf - Instructions after which the tracer must re-arm single-stepping, because they can load RFLAGS.TF from memory or a register (and the value they load may not have TF set).
- needs_
vector_ regs - Does this instruction use VSIB addressing (gather/scatter)?
- plan_
accesses - Computes every memory access
dwill attempt when executed fromstate. - predict_
successors - Predicts the RIP after
dexecutes fromstate. - rep_
count - The count register a REP string instruction uses, by address size.