Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CMemoryBlockRetrievalExtension.java7
1 files changed, 4 insertions, 3 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 3910dd9c066..a3e9f102821 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
@@ -235,14 +235,15 @@ public class CMemoryBlockRetrievalExtension extends PlatformObject implements IM
CStackFrame frame = getStackFrame( debugElement );
if ( frame != null ) {
- // We need to provide a better way for retrieving the address of expression
+ // Get the address of the expression
ICDIExpression cdiExpression = frame.getCDITarget().createExpression( expression );
exp = new CExpression( frame, cdiExpression, null );
IValue value = exp.getValue();
if ( value instanceof ICValue ) {
ICType type = ((ICValue)value).getType();
- if ( type != null && (type.isPointer() || type.isIntegralType() || type.isArray()) ) {
- address = value.getValueString();
+ if ( type != null ) {
+ // get the address for the expression, allow all types
+ address = frame.evaluateExpressionToString(exp.getExpressionString());
if ( address != null ) {
// ???
BigInteger a = ( address.startsWith( "0x" ) ) ? new BigInteger( address.substring( 2 ), 16 ) : new BigInteger( address ); //$NON-NLS-1$

Back to the top