From 8c185eb0d2cd28cc40527cdcfb8bc84e8dad5ad1 Mon Sep 17 00:00:00 2001 From: Alena Laskavaia Date: Thu, 13 Aug 2009 16:07:49 +0000 Subject: [PATCH] [244025] - fixed details for variable in base class for c++, based on patch from xgsa --- .../eclipse/cdt/debug/mi/core/cdi/model/Variable.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java index eb80fef034a..c858e7137dd 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java @@ -253,6 +253,16 @@ public abstract class Variable extends VariableDescriptor implements ICDIVariabl // so it is pretty safe without to do without any other type checks childFake = true; // fn remains unchanged otherwise it would be like x->public + } else if (cpp && childName.equals(vars[i].getType())) { + // it is a base class (which is returned by GDB as a field) + // (type of a child is the name of a child) + if (t instanceof ICDIPointerType) { + // fn -> casting to pointer base class + fn = "(" + childName + "*)" + fn;//$NON-NLS-1$ //$NON-NLS-2$ + } else { + // fn -> casting to base class + fn = "(" + childName + ")" + fn;//$NON-NLS-1$ //$NON-NLS-2$ + } } else if (t instanceof ICDIArrayType) { // For Array gdb varobj only return the index, override here. int index = castingIndex + i;