Class JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace
- Enclosing class:
JitBytesPcodeExecutorStatePiece
AddressSpace
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionJitBytesPcodeExecutorStateSpace
(Language language, AddressSpace space, Void backing) Construct a state space -
Method Summary
Methods inherited from class ghidra.pcode.exec.BytesPcodeExecutorStateSpace
addrRng, addrSet, clear, computeUninitialized, fork, getRegisterValues, getRegs, read, readBytes, readUninitializedFromBacking, spanRng, spanSet, warnAddressSet, warnUninit, write
-
Constructor Details
-
JitBytesPcodeExecutorStateSpace
Construct a state space- Parameters:
language
- the emulation target languagespace
- the address spacebacking
- any extra read-through backing (not used)
-
-
Method Details
-
getDirect
public byte[] getDirect(long offset) Pre-fetch the byte array for the block (page) containing the given offsetA translated passage is likely to call this several times in its constructor to pre-fetch the byte arrays for variables (ram, register, and unique) that it accesses directly, i.e., with a fixed offset. The generated code will then access the byte array directly to read and write the variable values in the emulator's state.
- Parameters:
offset
- theoffset
within this address space.- Returns:
- the byte array for the containing block
-
read
public byte[] read(long offset, int size) Read a variable from this (pre-fetched) state spaceA translated passage is likely to call
JitBytesPcodeExecutorStatePiece.getForSpace(AddressSpace, boolean)
once or twice in its constructor to pre-fetch the per-space backing of any indirect memory variables that it accesses, i.e., variables with a dynamic offset. These are usually required forPcodeOp.LOAD
andPcodeOp.STORE
ops. The generated code will then invoke this method (andwrite
) passing in the offset to access variables in the emulator's state at runtime.- Parameters:
offset
- the offset (known at runtime)size
- the size of the variable- Returns:
- the value of the variable as a byte array
-