PTP
Release 5.0

org.eclipse.ptp.debug.core.pdi.model
Interface IPDIMemoryBlock

All Superinterfaces:
IPDISessionObject, IPDISet

public interface IPDIMemoryBlock
extends IPDISessionObject

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


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.
 IPDIDataReadMemoryInfo getDataReadMemoryInfo()
           
 java.lang.String getExpression()
           
 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()
          Returns the size of each memory word in bytes
 boolean isFrozen()
          Determines whether the block does not update
 void refresh()
          Refresh the data, this may cause events to be trigger if the data values changed.
 void setDataReadMemoryInfo(IPDIDataReadMemoryInfo m)
           
 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 specified bytes.
 
Methods inherited from interface org.eclipse.ptp.debug.core.pdi.IPDISessionObject
getSession
 
Methods inherited from interface org.eclipse.ptp.debug.core.pdi.IPDISet
getTasks
 

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

getDataReadMemoryInfo

IPDIDataReadMemoryInfo getDataReadMemoryInfo()
Returns:

getExpression

java.lang.String getExpression()
Returns:

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

setDataReadMemoryInfo

void setDataReadMemoryInfo(IPDIDataReadMemoryInfo m)
Parameters:
m -

getBytes

byte[] getBytes()
                throws PDIException
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 PCDIException if this method fails. Reasons include:
  • Failure communicating with the debug target. The PDIException's status code contains the underlying exception responsible for the failure.
Throws:
PDIException

getLength

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

Returns:
the length of this memory block in bytes

getStartAddress

java.math.BigInteger getStartAddress()
Returns the start address of this memory block

Returns:
the start address of this memory block

getWordSize

int getWordSize()
Returns the size of each memory word in bytes

Returns:
The size of each memory word in bytes

isFrozen

boolean isFrozen()
Determines whether the block does not update

Returns:
true if the block does not update

refresh

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

Throws:
PDIException - on failure

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

setValue

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

PTP
Release 5.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.