diff options
3 files changed, 13 insertions, 22 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index 2b9acd110ac..07b0764806b 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,8 @@ +2005-06-27 Alain Magloire
+ Change in ICDIReferenceValue.
+ * cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceValue.java
+ * src/org/eclipse/cdt/debug/internal/core/model/CValue.java
+
2005-05-27 Alain Magloire
Use the fCDIVariable instead of fCDIVariableObject when possible.
* src/org/eclipse/cdt/debug/internal/core/model/CVariable.java
diff --git a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceValue.java b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceValue.java index 7b36b6f503c..477e85d58d2 100644 --- a/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceValue.java +++ b/debug/org.eclipse.cdt.debug.core/cdi/org/eclipse/cdt/debug/core/cdi/model/type/ICDIReferenceValue.java @@ -10,13 +10,17 @@ *******************************************************************************/ package org.eclipse.cdt.debug.core.cdi.model.type; -import java.math.BigInteger; - import org.eclipse.cdt.debug.core.cdi.CDIException; +import org.eclipse.cdt.debug.core.cdi.model.ICDIValue; /** */ public interface ICDIReferenceValue extends ICDIDerivedValue { - BigInteger referenceValue() throws CDIException; + /** + * Return the reference value. + * @return ICDIValue + * @throws CDIException + */ + ICDIValue referenceValue() throws CDIException; } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java index 4ea30e4db6b..ef677d31a7c 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java @@ -215,7 +215,7 @@ public class CValue extends AbstractCValue { else if ( cdiValue instanceof ICDIPointerValue ) return getPointerValueString( (ICDIPointerValue)cdiValue ); else if ( cdiValue instanceof ICDIReferenceValue ) - return getReferenceValueString( (ICDIReferenceValue)cdiValue ); + return processUnderlyingValue(((ICDIReferenceValue)cdiValue).referenceValue()); else if ( cdiValue instanceof ICDIWCharValue ) return getWCharValueString( (ICDIWCharValue)cdiValue ); else @@ -383,24 +383,6 @@ public class CValue extends AbstractCValue { return null; } - private String getReferenceValueString( ICDIReferenceValue value ) throws CDIException { - //NOTE: Reference should be displayed identically to address - //TODO:IPF_TODO Workaround to solve incoorect handling of structures referenced by pointers or references - IAddressFactory factory = ((CDebugTarget)getDebugTarget()).getAddressFactory(); - BigInteger refValue = value.referenceValue(); - if ( refValue == null ) - return ""; //$NON-NLS-1$ - IAddress address = factory.createAddress( refValue ); - if ( address == null ) - return ""; //$NON-NLS-1$ - CVariableFormat format = getParentVariable().getFormat(); - if ( CVariableFormat.NATURAL.equals( format ) || CVariableFormat.HEXADECIMAL.equals( format ) ) - return address.toHexAddressString(); - if ( CVariableFormat.DECIMAL.equals( format ) ) - return address.toString(); - return null; - } - private String getWCharValueString( ICDIWCharValue value ) throws CDIException { if ( getParentVariable() instanceof CVariable ) { int size = ((CVariable)getParentVariable()).sizeof(); |