Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2009-08-13 12:07:49 -0400
committerAlena Laskavaia2009-08-13 12:07:49 -0400
commit8c185eb0d2cd28cc40527cdcfb8bc84e8dad5ad1 (patch)
tree888b722c724abd3d5f2ef21c822a77f994fe45d8 /debug/org.eclipse.cdt.debug.mi.core
parent16deae8dfc62896738a87d8a19bcfc964c29f7f8 (diff)
downloadorg.eclipse.cdt-8c185eb0d2cd28cc40527cdcfb8bc84e8dad5ad1.tar.gz
org.eclipse.cdt-8c185eb0d2cd28cc40527cdcfb8bc84e8dad5ad1.tar.xz
org.eclipse.cdt-8c185eb0d2cd28cc40527cdcfb8bc84e8dad5ad1.zip
[244025] - fixed details for variable in base class for c++, based on patch from xgsa
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.java10
1 files changed, 10 insertions, 0 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 eb80fef034..c858e7137d 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;

Back to the top