Package ghidra.pcode.emu.jit
Class JitBytesPcodeExecutorStatePiece
java.lang.Object
ghidra.pcode.exec.AbstractLongOffsetPcodeExecutorStatePiece<byte[],byte[],JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>
ghidra.pcode.exec.AbstractBytesPcodeExecutorStatePiece<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>
ghidra.pcode.emu.jit.JitBytesPcodeExecutorStatePiece
- All Implemented Interfaces:
PcodeExecutorStatePiece<byte[],byte[]>
public class JitBytesPcodeExecutorStatePiece
extends AbstractBytesPcodeExecutorStatePiece<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>
The state piece for
JitDefaultBytesPcodeExecutorState
This provides access to the internals so that translated passages can pre-fetch certain objects to optimize state accesses.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class ghidra.pcode.exec.AbstractBytesPcodeExecutorStatePiece
AbstractBytesPcodeExecutorStatePiece.StateMemBufferNested classes/interfaces inherited from interface ghidra.pcode.exec.PcodeExecutorStatePiece
PcodeExecutorStatePiece.Reason -
Field Summary
Fields inherited from class ghidra.pcode.exec.AbstractBytesPcodeExecutorStatePiece
spaceMapFields inherited from class ghidra.pcode.exec.AbstractLongOffsetPcodeExecutorStatePiece
addressArithmetic, arithmetic, cb, language, uniqueSpace -
Constructor Summary
ConstructorsConstructorDescriptionJitBytesPcodeExecutorStatePiece(Language language, PcodeStateCallbacks cb) Construct a state piece -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Erase the entire state or piecegetForSpace(AddressSpace space, boolean toWrite) Get the internal space for the given address spacenewSpace(AddressSpace space) Methods inherited from class ghidra.pcode.exec.AbstractBytesPcodeExecutorStatePiece
getConcreteBuffer, getFromSpace, getRegisterValuesFromSpace, setInSpaceMethods inherited from class ghidra.pcode.exec.AbstractLongOffsetPcodeExecutorStatePiece
checkSize, forkMap, getAddressArithmetic, getArithmetic, getFromNullSpace, getLanguage, getRegisterValues, getUnique, getVar, getVar, getVarInternal, getVarInternal, getVarInternal, setUnique, setVar, setVar, setVarInternal, setVarInternal, setVarInternal, streamPiecesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.pcode.exec.PcodeExecutorStatePiece
checkRange, fork, getNextEntryInternal, getNextEntryInternal, getVar, getVar, getVar, inspectBigInteger, inspectByte, inspectConcrete, inspectInt, inspectLong, inspectRegisterValue, inspectShort, quantizeOffset, setBigInteger, setByte, setConcrete, setInt, setLong, setRegisterValue, setRegisterValue, setShort, setVar, setVar, setVar
-
Constructor Details
-
JitBytesPcodeExecutorStatePiece
Construct a state piece- Parameters:
language- the emulation target languagecb- callbacks to receive emulation events. Note that many accesses by the JIT are direct and so will not generate a callback. DO NOT rely on state callbacks yet.
-
-
Method Details
-
newSpace
protected JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace newSpace(AddressSpace space) -
clear
public void clear()Description copied from interface:PcodeExecutorStatePieceErase the entire state or pieceThis is generally only useful when the state is itself a cache to another object. This will ensure the state is reading from that object rather than a stale cache. If this is not a cache, this could in fact clear the whole state, and the machine using it will be left in the dark.
- Specified by:
clearin interfacePcodeExecutorStatePiece<byte[],byte[]> - Overrides:
clearin classAbstractBytesPcodeExecutorStatePiece<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>
-
getForSpace
public JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace getForSpace(AddressSpace space, boolean toWrite) Get the internal space for the given address spaceOverridden to grant public access. The JIT-generated constructors will need to invoke this method.
- Overrides:
getForSpacein classAbstractBytesPcodeExecutorStatePiece<JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace>- Parameters:
space- the address spacetoWrite- in case internal spaces are generated lazily, this indicates the space must be present, because it is going to be written to.- Returns:
- the space, or
null
-