Class EmulateMemoryStateBuffer

java.lang.Object
ghidra.pcode.emulate.EmulateMemoryStateBuffer
All Implemented Interfaces:
MemBuffer

@Deprecated(since="12.1", forRemoval=true) public class EmulateMemoryStateBuffer extends Object implements MemBuffer
Deprecated, for removal: This API element is subject to removal in a future version.
MemoryStateBuffer provides a MemBuffer for instruction parsing use which wraps an emulator MemoryState. This implementation wraps all specified memory offsets within the associated address space.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the Address which corresponds to the offset 0.
    getBigInteger(int offset, int size, boolean signed)
    Deprecated, for removal: This API element is subject to removal in a future version.
    returns the value at the given offset, taking into account the endianness.
    byte
    getByte(int offset)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get one byte from memory at the current position plus offset.
    int
    getBytes(byte[] b, int offset)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads b.length bytes from this memory buffer starting at the address of this memory buffer plus the given memoryBufferOffset from that position.
    int
    getInt(int offset)
    Deprecated, for removal: This API element is subject to removal in a future version.
    returns the int at the given offset, taking into account the endianness.
    long
    getLong(int offset)
    Deprecated, for removal: This API element is subject to removal in a future version.
    returns the long at the given offset, taking into account the endianness.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the Memory object actually used by the MemBuffer.
    short
    getShort(int offset)
    Deprecated, for removal: This API element is subject to removal in a future version.
    returns the short at the given offset, taking into account the endianness.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns true if the underlying bytes are in big-endian order, false if they are little endian.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EmulateMemoryStateBuffer

      public EmulateMemoryStateBuffer(MemoryState memState, Address addr)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • setAddress

      public void setAddress(Address addr)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getAddress

      public Address getAddress()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.
    • getBigInteger

      public BigInteger getBigInteger(int offset, int size, boolean signed) throws MemoryAccessException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: MemBuffer
      returns the value at the given offset, taking into account the endianness.
      Specified by:
      getBigInteger in interface MemBuffer
      Parameters:
      offset - the offset from the membuffers origin (the address that it is set at)
      size - the number of bytes to include in the value
      signed - true if value should be treated as a signed twos-compliment value.
      Returns:
      the value at the given offset, taking into account the endianness.
      Throws:
      MemoryAccessException - if the request size value cannot be read at the specified offset
    • getBytes

      public int getBytes(byte[] b, int offset)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: MemBuffer
      Reads b.length bytes from this memory buffer starting at the address of this memory buffer plus the given memoryBufferOffset from that position. The actual number of bytes may be fewer if bytes can't be read.
      Specified by:
      getBytes in interface MemBuffer
      Parameters:
      b - the buffer into which bytes will be placed
      offset - the offset in this memory buffer from which to start reading bytes.
      Returns:
      the number of bytes read which may be fewer than b.length if available bytes are exhausted or no bytes are available at the specified offset.
    • getByte

      public byte getByte(int offset) throws MemoryAccessException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: MemBuffer
      Get one byte from memory at the current position plus offset.
      Specified by:
      getByte in interface MemBuffer
      Parameters:
      offset - the displacement from the current position.
      Returns:
      the data at offset from the current position.
      Throws:
      MemoryAccessException - if memory cannot be read at the specified offset
    • getShort

      public short getShort(int offset) throws MemoryAccessException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: MemBuffer
      returns the short at the given offset, taking into account the endianness.
      Specified by:
      getShort in interface MemBuffer
      Parameters:
      offset - the offset from the membuffers origin (the address that it is set at)
      Returns:
      the short at the given offset, taking into account the endianness.
      Throws:
      MemoryAccessException - if a 2-byte short value cannot be read at the specified offset
    • getInt

      public int getInt(int offset) throws MemoryAccessException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: MemBuffer
      returns the int at the given offset, taking into account the endianness.
      Specified by:
      getInt in interface MemBuffer
      Parameters:
      offset - the offset from the membuffers origin (the address that it is set at)
      Returns:
      the int at the given offset, taking into account the endianness.
      Throws:
      MemoryAccessException - if a 4-byte integer value cannot be read at the specified offset
    • getLong

      public long getLong(int offset) throws MemoryAccessException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: MemBuffer
      returns the long at the given offset, taking into account the endianness.
      Specified by:
      getLong in interface MemBuffer
      Parameters:
      offset - the offset from the membuffers origin (the address that it is set at)
      Returns:
      the long at the given offset, taking into account the endianness.
      Throws:
      MemoryAccessException - if a 8-byte long value cannot be read at the specified offset
    • getMemory

      public Memory getMemory()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.