Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2009-08-13 12:13:48 -0400
committerAlena Laskavaia2009-08-13 12:13:48 -0400
commit9decaca7f9341434653dc6dd155b76a6c2752bf3 (patch)
tree9c6254cd2a988740e17eee8fc032640843f7e1f8
parentb4341f865e5912b2833044e0ceb6565f36e577f5 (diff)
downloadorg.eclipse.cdt-9decaca7f9341434653dc6dd155b76a6c2752bf3.tar.gz
org.eclipse.cdt-9decaca7f9341434653dc6dd155b76a6c2752bf3.tar.xz
org.eclipse.cdt-9decaca7f9341434653dc6dd155b76a6c2752bf3.zip
[244025] - fixed details for variable in base class for c++, based on patch from xgsa
-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