From a83210a3a1ff843ee59c8433a11f8c6154b55bc8 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Tue, 17 Sep 2002 17:55:26 +0000 Subject: [PATCH] Do not allow to modify aggregate variables. --- .../internal/core/model/CModificationVariable.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModificationVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModificationVariable.java index 082e0d73189..0697500f007 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModificationVariable.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModificationVariable.java @@ -47,12 +47,15 @@ public abstract class CModificationVariable extends CVariable { try { - ICDIValue currentValue = getCurrentValue(); - if ( currentValue != null ) + IValue value = getValue(); + if ( value != null && value instanceof ICValue ) { - return !( currentValue instanceof ICDIArrayValue || - currentValue instanceof ICDIStructureValue || - currentValue instanceof ICDIStringValue ); + switch( ((ICValue)value).getType() ) + { + case ICValue.TYPE_POINTER: + return true; + } + return !( value.hasVariables() ); } } catch( DebugException e )