org.eclipse.cdt.debug.internal.core
Class CMemoryBlockRetrievalExtension

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.cdt.debug.internal.core.CMemoryBlockRetrievalExtension
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.debug.core.model.IMemoryBlockRetrieval, org.eclipse.debug.core.model.IMemoryBlockRetrievalExtension

public class CMemoryBlockRetrievalExtension
extends org.eclipse.core.runtime.PlatformObject
implements org.eclipse.debug.core.model.IMemoryBlockRetrievalExtension

Implements the memory retrieval features based on the CDI model.


Constructor Summary
CMemoryBlockRetrievalExtension(CDebugTarget debugTarget)
          Constructor for CMemoryBlockRetrievalExtension.
 
Method Summary
static java.lang.String addressToString(java.math.BigInteger address, java.lang.String memorySpaceID)
           
 void dispose()
           
 org.eclipse.debug.core.model.IMemoryBlockExtension getExtendedMemoryBlock(java.lang.String expression, java.lang.Object selected)
           
 java.lang.String getMemento()
           
 org.eclipse.debug.core.model.IMemoryBlock getMemoryBlock(long startAddress, long length)
           
 org.eclipse.debug.core.model.IMemoryBlockExtension getMemoryBlockWithMemorySpaceID(java.lang.String address, java.lang.String memorySpaceID, java.lang.Object selected)
          Variant of getExtendedMemoryBlock that takes a memory space ID.
 java.lang.String[] getMemorySpaces()
          Get the list of available memory spaces from the CDI backend
 boolean hasMemorySpaces()
          Checks the CDI backend to see is memory spaces are supported and actually available for the target process.
 void initialize()
           
 void save()
           
static java.math.BigInteger stringToAddress(java.lang.String str, java.lang.StringBuffer memorySpaceID_out)
           
 boolean supportsStorageRetrieval()
           
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMemoryBlockRetrievalExtension

public CMemoryBlockRetrievalExtension(CDebugTarget debugTarget)
Constructor for CMemoryBlockRetrievalExtension.

Method Detail

initialize

public void initialize()

getMemento

public java.lang.String getMemento()
                            throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getExtendedMemoryBlock

public org.eclipse.debug.core.model.IMemoryBlockExtension getExtendedMemoryBlock(java.lang.String expression,
                                                                                 java.lang.Object selected)
                                                                          throws org.eclipse.debug.core.DebugException
Specified by:
getExtendedMemoryBlock in interface org.eclipse.debug.core.model.IMemoryBlockRetrievalExtension
Throws:
org.eclipse.debug.core.DebugException

supportsStorageRetrieval

public boolean supportsStorageRetrieval()
Specified by:
supportsStorageRetrieval in interface org.eclipse.debug.core.model.IMemoryBlockRetrieval

getMemoryBlock

public org.eclipse.debug.core.model.IMemoryBlock getMemoryBlock(long startAddress,
                                                                long length)
                                                         throws org.eclipse.debug.core.DebugException
Specified by:
getMemoryBlock in interface org.eclipse.debug.core.model.IMemoryBlockRetrieval
Throws:
org.eclipse.debug.core.DebugException

getMemoryBlockWithMemorySpaceID

public org.eclipse.debug.core.model.IMemoryBlockExtension getMemoryBlockWithMemorySpaceID(java.lang.String address,
                                                                                          java.lang.String memorySpaceID,
                                                                                          java.lang.Object selected)
                                                                                   throws org.eclipse.debug.core.DebugException
Variant of getExtendedMemoryBlock that takes a memory space ID. Note that unlike that one, this method is not part of IMemoryBlockRetrievalExtension; it is not exercised by the platform. We invoke it internally in CDT from our hook into the platform's "add memory monitor" action.

Parameters:
address - - a numric address value, hex or decimal. An expression (even something simple like 10000 +1) is not allowed.
memorySpaceID - - identifies the memory space; cannot be null.
selected - - the object selected in the Debug view
Returns:
Throws:
org.eclipse.debug.core.DebugException

save

public void save()

dispose

public void dispose()

hasMemorySpaces

public boolean hasMemorySpaces()
Checks the CDI backend to see is memory spaces are supported and actually available for the target process.

Returns:
true if the backend supports memory spaces

getMemorySpaces

public java.lang.String[] getMemorySpaces()
Get the list of available memory spaces from the CDI backend

Returns:
an array of memory space identifiers

addressToString

public static java.lang.String addressToString(java.math.BigInteger address,
                                               java.lang.String memorySpaceID)

stringToAddress

public static java.math.BigInteger stringToAddress(java.lang.String str,
                                                   java.lang.StringBuffer memorySpaceID_out)
                                            throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException