Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2010-04-08 21:07:13 +0000
committerAlena Laskavaia2010-04-08 21:07:13 +0000
commit92b10b9ca5e3523934cba6ef8c5ae8962cf06913 (patch)
tree583eb230bf9907cfa7c5f163a9e8a6121d70c425 /debug/org.eclipse.cdt.debug.mi.core
parent119d848c62505f121f6c87d3e56109cc37753ad4 (diff)
downloadorg.eclipse.cdt-92b10b9ca5e3523934cba6ef8c5ae8962cf06913.tar.gz
org.eclipse.cdt-92b10b9ca5e3523934cba6ef8c5ae8962cf06913.tar.xz
org.eclipse.cdt-92b10b9ca5e3523934cba6ef8c5ae8962cf06913.zip
[304010] - exploring values of base class fields
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.core')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java5
1 files changed, 3 insertions, 2 deletions
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 c858e7137dd..0167a1bd940 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
@@ -256,12 +256,13 @@ public abstract class Variable extends VariableDescriptor implements ICDIVariabl
} 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)
+ String childNameForCast = childName.contains("::") ? "'" + childName + "'" : childName; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (t instanceof ICDIPointerType) {
// fn -> casting to pointer base class
- fn = "(" + childName + "*)" + fn;//$NON-NLS-1$ //$NON-NLS-2$
+ fn = "(struct " + childNameForCast + ")(*" + fn + ")";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
// fn -> casting to base class
- fn = "(" + childName + ")" + fn;//$NON-NLS-1$ //$NON-NLS-2$
+ fn = "(struct " + childNameForCast + ")" + fn;//$NON-NLS-1$ //$NON-NLS-2$
}
} else if (t instanceof ICDIArrayType) {
// For Array gdb varobj only return the index, override here.

Back to the top