Eclipse CDT
7.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.
 java.math.BigInteger getStartAddress()
          Returns the start address of this memory block.
 int getWordSize()
          This method is a misnomer.
 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

java.math.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()
This method is a misnomer. It should be getAddressableSize. This is how CDT finds out from the CDI client the addressable size of the memory--i.e., how many bytes per address. Some embedded systems have memory with addressable sizes >1. Such backends should make sure to ignore the now deprecated wordSize parameter of ICDIMemoryBlockManagement.createMemory block() and not regurgitate that value in the implementation of this method.

Returns:
The addressable size of the memory

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
7.0

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