Class Overview
A resolver attempts to determine the actual value of symbols and items used by instruction
artifacts. They can be: branch targets, register values, operand values, flags and other
processor state data, etc.
Public Methods
public
abstract
ICodePointer
determineNextAddress
(IMachineContext context, InsnType instruction)
Determine the next value of the program counter (PC). Note that the instruction is provided
optionally (the context has enough data to parse the instruction at the current PC); however,
in practice, the instruction at PC has very likely been decoded already, and is provided by
the caller. In such a case, the implementor is free to check the consistency between the
provided instruction and the context (eg, performing a basic byte match). An
IllegalArgumentException can be raised if a mismatch is detected.
Parameters
context |
mandatory context |
instruction |
optional instruction |
Returns
- the next address as well as any possible relevant information about the processor
state when that next address is executed (eg, processor mode change)
public
abstract
IResolvedOperandValue
determineOperandValue
(IMachineContext context, InsnType instruction, int index)
Determine the actual values of an instruction operand. Note that the instruction is provided
optionally (the context has enough data to parse the instruction at the current PC); however,
in practice, the instruction at PC has very likely been decoded already, and is provided by
the caller. In such a case, the implementor is free to check the consistency between the
provided instruction and the context (eg, performing a basic byte match). An
IllegalArgumentException can be raised if a mismatch is detected.
Parameters
context |
mandatory context |
instruction |
optional instruction |
index |
the operand index |