Package ghidra.pcode.emu.jit

# Class JitDefaultBytesPcodeExecutorState

java.lang.Object
ghidra.pcode.exec.AbstractPcodeExecutorState<byte[],byte[]>
ghidra.pcode.exec.DefaultPcodeExecutorState<byte[]>
ghidra.pcode.emu.jit.JitDefaultBytesPcodeExecutorState

All Implemented Interfaces:
  `JitBytesPcodeExecutorState`, `PcodeExecutorState<byte[]>`, `PcodeExecutorStatePiece<byte[],byte[]>`

public class JitDefaultBytesPcodeExecutorState extends DefaultPcodeExecutorState<byte[]> implements JitBytesPcodeExecutorState
The default implementation of `JitBytesPcodeExecutorState`.

NOTE: This is distinct from `JitDataFlowState`, which is used during the interpretation and analysis of the passage to translate. This state, in contrast, is the concrete state of the emulation target, but accessible in special ways to the translation output. In particular, the constructor of each translation is permitted direct access to some of this state's internals, so that it can pre-fetch, e.g., backing arrays for direct memory access operations.

This is just an extension of `DefaultPcodeExecutorState` that wraps the corresponding `JitBytesPcodeExecutorStatePiece`.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface ghidra.pcode.exec.PcodeExecutorStatePiece

  `PcodeExecutorStatePiece.Reason`

- ## Field Summary

  ### Fields inherited from class ghidra.pcode.exec.DefaultPcodeExecutorState

  `arithmetic`

  ### Fields inherited from class ghidra.pcode.exec.AbstractPcodeExecutorState

  `piece`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JitDefaultBytesPcodeExecutorState(Language language, PcodeStateCallbacks cb)`
  Construct a new state for the given language

- ## Method Summary

  Modifier and Type
  Method
  Description
  `JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace`
  `getForSpace(AddressSpace space)`
  For generated code to side-step the space lookup
  `protected JitBytesPcodeExecutorStatePiece`
  `getPiece()`
  Get the piece cast to the type we know it is

  ### Methods inherited from class ghidra.pcode.exec.DefaultPcodeExecutorState

  `extractAddress, fork`

  ### Methods inherited from class ghidra.pcode.exec.AbstractPcodeExecutorState

  `clear, getArithmetic, getConcreteBuffer, getLanguage, getRegisterValues, getVar, getVar, getVarInternal, getVarInternal, setVar, setVar, setVarInternal, setVarInternal, streamPieces`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ghidra.pcode.exec.PcodeExecutorState

  `fork, getAddressArithmetic, paired`

  ### Methods inherited from interface ghidra.pcode.exec.PcodeExecutorStatePiece

  `checkRange, clear, getArithmetic, getConcreteBuffer, getLanguage, getNextEntryInternal, getNextEntryInternal, getRegisterValues, getVar, getVar, getVar, getVar, getVar, getVarInternal, getVarInternal, inspectBigInteger, inspectByte, inspectConcrete, inspectInt, inspectLong, inspectRegisterValue, inspectShort, quantizeOffset, setBigInteger, setByte, setConcrete, setInt, setLong, setRegisterValue, setRegisterValue, setShort, setVar, setVar, setVar, setVar, setVar, setVarInternal, setVarInternal, streamPieces`

- ## Constructor Details

  - ### JitDefaultBytesPcodeExecutorState

    public JitDefaultBytesPcodeExecutorState(Language language, PcodeStateCallbacks cb)
    Construct a new state for the given language
    Parameters:
      `language` - the emulation target language
      `cb` - callbacks to receive emulation events. Because the JIT often accesses state directly, it will bypass several callbacks. DO NOT rely on callbacks, yet.

- ## Method Details

  - ### getPiece

    protected JitBytesPcodeExecutorStatePiece getPiece()
    Get the piece cast to the type we know it is
    Returns:
      the piece

  - ### getForSpace

    public JitBytesPcodeExecutorStatePiece.JitBytesPcodeExecutorStateSpace getForSpace(AddressSpace space)
    Description copied from interface: `JitBytesPcodeExecutorState`
    For generated code to side-step the space lookup
    Specified by:
      `getForSpace` in interface `JitBytesPcodeExecutorState`
    Parameters:
      `space` - the address space
    Returns:
      the state space