Interface IMemoryBlock

  • All Superinterfaces:
    IAdaptable, IDebugElement
    All Known Subinterfaces:
    IMemoryBlockExtension

    public interface IMemoryBlock
    extends IDebugElement
    A contiguous segment of memory in an execution context. A memory block is represented by a starting memory address and a length. Not all debug architectures support the retrieval of memory blocks.

    Clients may implement this interface.

    Since:
    2.0
    See Also:
    IMemoryBlockRetrieval
    • Method Detail

      • getStartAddress

        long getStartAddress()
        Returns the start address of this memory block.
        Returns:
        the start address of this memory block
      • getLength

        long getLength()
        Returns the length of this memory block in bytes.
        Returns:
        the length of this memory block in bytes
      • getBytes

        byte[] getBytes()
                 throws DebugException
        Returns the values of the bytes currently contained in this this memory block.
        Returns:
        the values of the bytes currently contained in this this memory block
        Throws:
        DebugException - if this method fails. Reasons include:
        • Failure communicating with the debug target. The DebugException's status code contains the underlying exception responsible for the failure.
      • supportsValueModification

        boolean supportsValueModification()
        Returns whether this memory block supports value modification
        Returns:
        whether this memory block supports value modification
      • setValue

        void setValue​(long offset,
                      byte[] bytes)
               throws DebugException
        Sets the value of the bytes in this memory block at the specified offset within this memory block to the specified bytes. The offset is zero based.
        Parameters:
        offset - the offset at which to set the new values
        bytes - the new values
        Throws:
        DebugException - if this method fails. Reasons include:
        • Failure communicating with the debug target. The DebugException's status code contains the underlying exception responsible for the failure.
        • This memory block does not support value modification
        • The specified offset is greater than or equal to the length of this memory block, or the number of bytes specified goes beyond the end of this memory block (index of out of range)