Interface PcodeExecutorState<T>
- Type Parameters:
T
- the type of offsets and values
- All Superinterfaces:
PcodeExecutorStatePiece<T,
T>
- All Known Implementing Classes:
BytesPcodeExecutorState
,DefaultPcodeExecutorState
,PairedPcodeExecutorState
,ThreadPcodeExecutorState
T
This is not much more than a stricter form of PcodeExecutorStatePiece
, in that it
requires the value and address offset types to agree, so that a p-code executor or emulator can
perform loads and stores using indirect addresses. The typical pattern for implementing a state
is to compose it from pieces. See PcodeExecutorStatePiece
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ghidra.pcode.exec.PcodeExecutorStatePiece
PcodeExecutorStatePiece.Reason
-
Method Summary
Modifier and TypeMethodDescriptionfork()
Create a deep copy of this statedefault PcodeArithmetic
<T> Get the arithmetic used to manipulate addresses of the type used by this statedefault <U> PcodeExecutorState
<org.apache.commons.lang3.tuple.Pair<T, U>> paired
(PcodeExecutorStatePiece<T, U> right) Use this state as the control, paired with the given auxiliary state.Methods inherited from interface ghidra.pcode.exec.PcodeExecutorStatePiece
checkRange, clear, getArithmetic, getConcreteBuffer, getLanguage, getRegisterValues, getVar, getVar, getVar, getVar, getVar, quantizeOffset, setVar, setVar, setVar, setVar, setVar
-
Method Details
-
getAddressArithmetic
Description copied from interface:PcodeExecutorStatePiece
Get the arithmetic used to manipulate addresses of the type used by this state- Specified by:
getAddressArithmetic
in interfacePcodeExecutorStatePiece<T,
T> - Returns:
- the address (or offset) arithmetic
-
fork
PcodeExecutorState<T> fork()Description copied from interface:PcodeExecutorStatePiece
Create a deep copy of this state- Specified by:
fork
in interfacePcodeExecutorStatePiece<T,
T> - Returns:
- the copy
-
paired
default <U> PcodeExecutorState<org.apache.commons.lang3.tuple.Pair<T,U>> paired(PcodeExecutorStatePiece<T, U> right) Use this state as the control, paired with the given auxiliary state.CAUTION: Often, the default paired state is not quite sufficient. Consider
PcodeExecutorStatePiece.getVar(AddressSpace, Object, int, boolean, Reason)
. The rider on the offset may offer information that must be incorporated into the rider of the value just read. This is the case, for example, with taint propagation. In those cases, an anonymous inner class extendingPairedPcodeExecutorState
is sufficient.- Type Parameters:
U
- the type of values and offsets stored by the rider- Parameters:
right
- the rider state- Returns:
- the paired state
-