Package ghidra.pcode.exec

# Class DebuggerPcodeUtils.WatchValuePcodeExecutorStatePiece

java.lang.Object
ghidra.pcode.exec.DebuggerPcodeUtils.WatchValuePcodeExecutorStatePiece

All Implemented Interfaces:
  `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`

Enclosing class:
  `DebuggerPcodeUtils`

public static class DebuggerPcodeUtils.WatchValuePcodeExecutorStatePiece extends Object implements PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>

- ## Nested Class Summary

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

  `PcodeExecutorStatePiece.Reason`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WatchValuePcodeExecutorStatePiece(PcodeExecutorStatePiece<byte[],byte[]> bytesPiece, PcodeExecutorStatePiece<byte[],TraceMemoryState> statePiece, PcodeExecutorStatePiece<byte[],ValueLocation> locationPiece, PcodeExecutorStatePiece<byte[],AddressSetView> readsPiece)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  Erase the entire state or piece
  `DebuggerPcodeUtils.WatchValuePcodeExecutorStatePiece`
  `fork(PcodeStateCallbacks cb)`
  Create a deep copy of this state
  `PcodeArithmetic<byte[]>`
  `getAddressArithmetic()`
  Get the arithmetic used to manipulate addresses of the type used by this state
  `PcodeArithmetic<DebuggerPcodeUtils.WatchValue>`
  `getArithmetic()`
  Get the arithmetic used to manipulate values of the type stored by this state
  `MemBuffer`
  `getConcreteBuffer(Address address, PcodeArithmetic.Purpose purpose)`
  Bind a buffer of concrete bytes at the given start address
  `Language`
  `getLanguage()`
  Get the language defining the address spaces of this state piece
  `Map<Register,DebuggerPcodeUtils.WatchValue>`
  `getRegisterValues()`
  Get all register values known to this state
  `DebuggerPcodeUtils.WatchValue`
  `getVar(AddressSpace space, byte[] offset, int size, boolean quantize, PcodeExecutorStatePiece.Reason reason)`
  Get the value of a variable
  `DebuggerPcodeUtils.WatchValue`
  `getVarInternal(AddressSpace space, byte[] offset, int size, PcodeExecutorStatePiece.Reason reason)`
  Get the value of a variable without issuing callbacks
  `void`
  `setVar(AddressSpace space, byte[] offset, int size, boolean quantize, DebuggerPcodeUtils.WatchValue val)`
  Set the value of a variable
  `void`
  `setVarInternal(AddressSpace space, byte[] offset, int size, DebuggerPcodeUtils.WatchValue val)`
  Set the value of a variable without issuing callbacks
  `Stream<PcodeExecutorStatePiece<?,?>>`
  `streamPieces()`
  Stream over the pieces within.

  ### 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.PcodeExecutorStatePiece

  `checkRange, getNextEntryInternal, getNextEntryInternal, getVar, getVar, getVar, getVar, getVarInternal, inspectBigInteger, inspectByte, inspectConcrete, inspectInt, inspectLong, inspectRegisterValue, inspectShort, quantizeOffset, setBigInteger, setByte, setConcrete, setInt, setLong, setRegisterValue, setRegisterValue, setShort, setVar, setVar, setVar, setVar, setVarInternal`

- ## Constructor Details

  - ### WatchValuePcodeExecutorStatePiece

    public WatchValuePcodeExecutorStatePiece(PcodeExecutorStatePiece<byte[],byte[]> bytesPiece, PcodeExecutorStatePiece<byte[],TraceMemoryState> statePiece, PcodeExecutorStatePiece<byte[],ValueLocation> locationPiece, PcodeExecutorStatePiece<byte[],AddressSetView> readsPiece)

- ## Method Details

  - ### getLanguage

    public Language getLanguage()
    Description copied from interface: `PcodeExecutorStatePiece`
    Get the language defining the address spaces of this state piece
    Specified by:
      `getLanguage` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`
    Returns:
      the language

  - ### getAddressArithmetic

    public PcodeArithmetic<byte[]> getAddressArithmetic()
    Description copied from interface: `PcodeExecutorStatePiece`
    Get the arithmetic used to manipulate addresses of the type used by this state
    Specified by:
      `getAddressArithmetic` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`
    Returns:
      the address (or offset) arithmetic

  - ### getArithmetic

    public PcodeArithmetic<DebuggerPcodeUtils.WatchValue> getArithmetic()
    Description copied from interface: `PcodeExecutorStatePiece`
    Get the arithmetic used to manipulate values of the type stored by this state
    Specified by:
      `getArithmetic` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`
    Returns:
      the arithmetic

  - ### streamPieces

    public Stream<PcodeExecutorStatePiece<?,?>> streamPieces()
    Description copied from interface: `PcodeExecutorStatePiece`
    Stream over the pieces within.

    If this piece is not a composition of others, then simply stream this piece in a singleton. Otherwise, stream the component pieces. (Do not include the composition itself, just the component pieces.)

    Specified by:
      `streamPieces` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`
    Returns:
      the stream

  - ### fork

    public DebuggerPcodeUtils.WatchValuePcodeExecutorStatePiece fork(PcodeStateCallbacks cb)
    Description copied from interface: `PcodeExecutorStatePiece`
    Create a deep copy of this state
    Specified by:
      `fork` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`
    Parameters:
      `cb` - callbacks to receive emulation events
    Returns:
      the copy

  - ### setVarInternal

    public void setVarInternal(AddressSpace space, byte[] offset, int size, DebuggerPcodeUtils.WatchValue val)
    Description copied from interface: `PcodeExecutorStatePiece`
    Set the value of a variable without issuing callbacks
    Specified by:
      `setVarInternal` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`
    Parameters:
      `space` - the address space
      `offset` - the offset within the space
      `size` - the size of the variable
      `val` - the value

  - ### setVar

    public void setVar(AddressSpace space, byte[] offset, int size, boolean quantize, DebuggerPcodeUtils.WatchValue val)
    Description copied from interface: `PcodeExecutorStatePiece`
    Set the value of a variable
    Specified by:
      `setVar` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`
    Parameters:
      `space` - the address space
      `offset` - the offset within the space
      `size` - the size of the variable
      `quantize` - true to quantize to the language's "addressable unit"
      `val` - the value

  - ### getVar

    public DebuggerPcodeUtils.WatchValue getVar(AddressSpace space, byte[] offset, int size, boolean quantize, PcodeExecutorStatePiece.Reason reason)
    Description copied from interface: `PcodeExecutorStatePiece`
    Get the value of a variable
    Specified by:
      `getVar` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`
    Parameters:
      `space` - the address space
      `offset` - the offset within the space
      `size` - the size of the variable
      `quantize` - true to quantize to the language's "addressable unit"
      `reason` - the reason for reading the variable
    Returns:
      the value

  - ### getVarInternal

    public DebuggerPcodeUtils.WatchValue getVarInternal(AddressSpace space, byte[] offset, int size, PcodeExecutorStatePiece.Reason reason)
    Description copied from interface: `PcodeExecutorStatePiece`
    Get the value of a variable without issuing callbacks
    Specified by:
      `getVarInternal` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`
    Parameters:
      `space` - the address space
      `offset` - the offset within the space
      `size` - the size of the variable
      `reason` - the reason for reading the variable
    Returns:
      the value

  - ### getRegisterValues

    public Map<Register,DebuggerPcodeUtils.WatchValue> getRegisterValues()
    Description copied from interface: `PcodeExecutorStatePiece`
    Get all register values known to this state

    When the state acts as a cache, it should only return those cached.

    Specified by:
      `getRegisterValues` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`
    Returns:
      a map of registers and their values

  - ### getConcreteBuffer

    public MemBuffer getConcreteBuffer(Address address, PcodeArithmetic.Purpose purpose)
    Description copied from interface: `PcodeExecutorStatePiece`
    Bind a buffer of concrete bytes at the given start address
    Specified by:
      `getConcreteBuffer` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`
    Parameters:
      `address` - the start address
      `purpose` - the reason why the emulator needs a concrete value
    Returns:
      a buffer

  - ### clear

    public void clear()
    Description copied from interface: `PcodeExecutorStatePiece`
    Erase the entire state or piece

    This 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:
      `clear` in interface `PcodeExecutorStatePiece<byte[],DebuggerPcodeUtils.WatchValue>`