Eclipse Platform
2.0

org.eclipse.debug.core.model
Interface IMemoryBlock

All Superinterfaces:
IAdaptable, IDebugElement

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.

Since:
2.0
See Also:
IMemoryBlockRetrieval

Method Summary
 byte[] getBytes()
          Returns the values of the bytes currently contained in this this memory block.
 long getLength()
          Returns the length of this memory block in bytes.
 long getStartAddress()
          Returns the start address of this memory block.
 void setValue(long offset, byte[] bytes)
          Sets the value of the bytes in this memory block at the specified offset within this memory block to the spcified bytes.
 boolean supportsValueModification()
          Returns whether this memory block supports value modification
 
Methods inherited from interface org.eclipse.debug.core.model.IDebugElement
getDebugTarget, getLaunch, getModelIdentifier
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

getStartAddress

public long getStartAddress()
Returns the start address of this memory block.

Returns:
the start address of this memory block

getLength

public long getLength()
Returns the length of this memory block in bytes.

Returns:
the length of this memory block in bytes

getBytes

public 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

public boolean supportsValueModification()
Returns whether this memory block supports value modification

Returns:
whether this memory block supports value modification

setValue

public 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 spcified 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)

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.