Eclipse CDT
Pre-release 3.0

org.eclipse.cdt.debug.core.cdi.model
Interface ICDIMemoryBlock

All Superinterfaces:
ICDIObject

public interface ICDIMemoryBlock
extends ICDIObject

A contiguous segment of memory in an execution context. A memory block is represented by a starting memory address and a length.

Since:
Jul 18, 2002

Field Summary
static byte READ_ONLY
          Bit mask used to indicate a byte is read-only.
static byte VALID
          Bit mask used to indicate a byte is valid.
 
Method Summary
 byte[] getBytes()
          Returns the values of the bytes currently contained in this this memory block.
 byte getFlags(int offset)
          Returns this memory byte's attribute as a bit mask.
 long getLength()
          Returns the length of this memory block in bytes.
 BigInteger getStartAddress()
          Returns the start address of this memory block.
 int getWordSize()
           
 boolean isFrozen()
           
 void refresh()
          Refresh the data, this may cause events to be trigger if the data values changed.
 void setFrozen(boolean frozen)
          A memoryBlock set frozen means that the block will not update and check for new data.
 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.
 
Methods inherited from interface org.eclipse.cdt.debug.core.cdi.model.ICDIObject
getTarget
 

Field Detail

READ_ONLY

static final byte READ_ONLY
Bit mask used to indicate a byte is read-only.

See Also:
Constant Field Values

VALID

static final byte VALID
Bit mask used to indicate a byte is valid.

See Also:
Constant Field Values
Method Detail

getStartAddress

BigInteger 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

getWordSize

int getWordSize()
Returns:
The size of each memory word in bytes.

getBytes

byte[] getBytes()
                throws CDIException
Returns the values of the bytes currently contained in this this memory block. Note: the number maybe greater or lower to what was requested.

Returns:
the values of the bytes currently contained in this this memory block
Throws:
CDIException - if this method fails. Reasons include:
  • Failure communicating with the debug target. The CDIException's status code contains the underlying exception responsible for the failure.

getFlags

byte getFlags(int offset)
Returns this memory byte's attribute as a bit mask. The method throw IndexOutOfBoundsException if the offset is out of range of the block.

Returns:
this memory byte's attribute as a bit mask

setValue

void setValue(long offset,
              byte[] bytes)
              throws CDIException
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:
CDIException - if this method fails. Reasons include:
  • Failure communicating with the debug target. The CDIException'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)

isFrozen

boolean isFrozen()
Returns:
true if the block does not update.

setFrozen

void setFrozen(boolean frozen)
A memoryBlock set frozen means that the block will not update and check for new data.

Parameters:
frozen - the block is frozen by default.

refresh

void refresh()
             throws CDIException
Refresh the data, this may cause events to be trigger if the data values changed.

Throws:
CDIException

Eclipse CDT
Pre-release 3.0

Copyright (c) IBM Corp. and others 2004. All Rights Reserved.