Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorJohn Cortell2007-02-13 13:10:08 +0000
committerJohn Cortell2007-02-13 13:10:08 +0000
commit88faee0afebeccdeb6a0f10eaf16aa826d4ae79f (patch)
tree20a1e368d27c8d0426b4aa0d76cfb2cadd0310ed /debug
parentd6bcb20759251b8867a5683b091841524728daee (diff)
downloadorg.eclipse.cdt-88faee0afebeccdeb6a0f10eaf16aa826d4ae79f.tar.gz
org.eclipse.cdt-88faee0afebeccdeb6a0f10eaf16aa826d4ae79f.tar.xz
org.eclipse.cdt-88faee0afebeccdeb6a0f10eaf16aa826d4ae79f.zip
Fix to memory space support. Monitors created with expressions were not restored for CDI clients with memory spaces.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CMemoryBlockRetrievalExtension.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CMemoryBlockRetrievalExtension.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CMemoryBlockRetrievalExtension.java
index c84874aea0b..57ef5b53d08 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CMemoryBlockRetrievalExtension.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CMemoryBlockRetrievalExtension.java
@@ -161,9 +161,11 @@ public class CMemoryBlockRetrievalExtension extends PlatformObject implements IM
BigInteger addrBigInt = null;
String memorySpaceID = null;
if (hasMemorySpaces()) {
+ // Can't tell if block was created with a memory-space/address or with an expression.
+ // Assume the former and let an exception in the decoding tell us otherwise
ICDITarget cdiTarget = fDebugTarget.getCDITarget();
- StringBuffer sbuf = new StringBuffer();
try {
+ StringBuffer sbuf = new StringBuffer();
addrBigInt = ((ICDIMemorySpaceManagement)cdiTarget).stringToAddress(memBlockExt.getExpression(), sbuf);
if (addrBigInt == null) {
// Client wants our default decoding; minimum is "<space>:0x?"
@@ -171,10 +173,12 @@ public class CMemoryBlockRetrievalExtension extends PlatformObject implements IM
}
memorySpaceID = sbuf.toString();
}
- catch( CDIException e ) {
- CDebugCorePlugin.log( e );
+ catch( CDIException e ) { // thrown by CDI client decoding method
addrBigInt = null;
}
+ catch (CoreException e) {
+ addrBigInt = null; // thrown by our decoding method
+ }
}
Element child = document.createElement( MEMORY_BLOCK_EXPRESSION );
@@ -218,7 +222,7 @@ public class CMemoryBlockRetrievalExtension extends PlatformObject implements IM
}
// See if the expression is a simple numeric value; if it is, we can avoid some costly
- // processing (avoid calling the backend to resolve the expression)
+ // processing (calling the backend to resolve the expression)
try {
IAddressFactory addrFactory = ((CDebugTarget)target).getAddressFactory();
String hexstr = addrFactory.createAddress(expression).toString(16);
@@ -399,4 +403,4 @@ public class CMemoryBlockRetrievalExtension extends PlatformObject implements IM
memorySpaceID_out.append(str.substring(0, index));
return new BigInteger(str.substring(index+3), 16);
}
-} \ No newline at end of file
+}

Back to the top