Package ghidra.pcode.exec

# Class AbstractBytesPcodeExecutorStatePiece.StateMemBuffer

java.lang.Object
ghidra.pcode.exec.AbstractBytesPcodeExecutorStatePiece.StateMemBuffer

All Implemented Interfaces:
  `MemBuffer`, `MemBufferMixin`

Enclosing class:
  AbstractBytesPcodeExecutorStatePiece<S extends BytesPcodeExecutorStateSpace<?>>

protected class AbstractBytesPcodeExecutorStatePiece.StateMemBuffer extends Object implements MemBufferMixin
A memory buffer bound to a given space in this state

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final Address`
  `address`
  `protected final PcodeExecutorStatePiece.Reason`
  `reason`
  `protected final BytesPcodeExecutorStateSpace<?>`
  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StateMemBuffer(Address address, BytesPcodeExecutorStateSpace<?> source, PcodeExecutorStatePiece.Reason reason)`
  Construct a buffer bound to the given space, at the given address

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Address`
  `getAddress()`
  Get the Address which corresponds to the offset 0.
  `int`
  `getBytes(ByteBuffer buffer, int addressOffset)`
  `Memory`
  `getMemory()`
  Get the Memory object actually used by the MemBuffer.
  `boolean`
  `isBigEndian()`
  Returns true if the underlying bytes are in big-endian order, false if they are little endian.

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

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

  ### Methods inherited from interface ghidra.program.model.mem.MemBuffer

  `getInputStream, getInputStream, getUnsignedByte, getUnsignedInt, getUnsignedShort, getVarLengthInt, getVarLengthUnsignedInt, isInitializedMemory`

  ### Methods inherited from interface ghidra.program.model.mem.MemBufferMixin

  `getBigInteger, getByte, getBytes, getBytesInFull, getInt, getLong, getShort`

- ## Field Details

  - ### address

    protected final Address address

  - ### source

    protected final BytesPcodeExecutorStateSpace<?> source

  - ### reason

    protected final PcodeExecutorStatePiece.Reason reason

- ## Constructor Details

  - ### StateMemBuffer

    public StateMemBuffer(Address address, BytesPcodeExecutorStateSpace<?> source, PcodeExecutorStatePiece.Reason reason)
    Construct a buffer bound to the given space, at the given address
    Parameters:
      `address` - the address
      `source` - the space
      `reason` - the reason this buffer reads from the state, as in `PcodeExecutorStatePiece.getVar(Varnode, Reason)`

- ## Method Details

  - ### getAddress

    public Address getAddress()
    Description copied from interface: `MemBuffer`
    Get the Address which corresponds to the offset 0.
    Specified by:
      `getAddress` in interface `MemBuffer`
    Returns:
      the current address of offset 0.

  - ### getMemory

    public Memory getMemory()
    Description copied from interface: `MemBuffer`
    Get the Memory object actually used by the MemBuffer.
    Specified by:
      `getMemory` in interface `MemBuffer`
    Returns:
      the Memory used by this MemBuffer or null if not available.

  - ### isBigEndian

    public boolean isBigEndian()
    Description copied from interface: `MemBuffer`
    Returns true if the underlying bytes are in big-endian order, false if they are little endian.
    Specified by:
      `isBigEndian` in interface `MemBuffer`
    Returns:
      true if the underlying bytes are in big-endian order, false if they are little endian.

  - ### getBytes

    public int getBytes(ByteBuffer buffer, int addressOffset)
    Specified by:
      `getBytes` in interface `MemBufferMixin`