Package ghidra.pcode.eval
Interface VarnodeEvaluator<T>
- Type Parameters:
T- the type of values resulting from evaluation
- All Known Implementing Classes:
AbstractVarnodeEvaluator,ArithmeticVarnodeEvaluator
public interface VarnodeEvaluator<T>
An evaluator of high varnodes
This is a limited analog to PcodeExecutor but for high p-code. It is limited in that it
can only "execute" parts of the AST that represent expressions, as a means of evaluating them. If
it encounters, e.g., a PcodeOp.MULTIEQUAL or phi node, it will terminate throw an
exception.
-
Method Summary
Modifier and TypeMethodDescriptionevaluateOp(Program program, PcodeOp op) Evaluate a high p-code opevaluateStorage(Program program, VariableStorage storage) Evaluate variable storageevaluateVarnode(Program program, Varnode vn) Evaluate a varnode
-
Method Details
-
evaluateVarnode
Evaluate a varnode- Parameters:
program- the program containing the varnodevn- the varnode to evaluate- Returns:
- the value of the varnode
-
evaluateStorage
Evaluate variable storageEach varnode is evaluated as in
evaluateStorage(Program, VariableStorage)and then concatenated. The lower-indexed varnodes in storage are the more significant pieces, similar to big endian.- Parameters:
program- the program containing the variable storagestorage- the storage- Returns:
- the value of the storage
-
evaluateOp
Evaluate a high p-code op- Parameters:
program- the program containing the opop- the p-code op- Returns:
- the value of the op's output
-