Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2003-08-21 10:53:41 -0400
committerAlain Magloire2003-08-21 10:53:41 -0400
commitbf1f86abc1521d1e48e14dc11e12f01671eaafc1 (patch)
tree8294e298ebd7a79409ef3e1209ceecd7d9340db4
parenta31b9f5d4f312f1dcfa0e6536150393193b60181 (diff)
downloadorg.eclipse.cdt-bf1f86abc1521d1e48e14dc11e12f01671eaafc1.tar.gz
org.eclipse.cdt-bf1f86abc1521d1e48e14dc11e12f01671eaafc1.tar.xz
org.eclipse.cdt-bf1f86abc1521d1e48e14dc11e12f01671eaafc1.zip
name of the Array.
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
index 9ba97c5d621..e99c5aa1854 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
@@ -165,11 +165,15 @@ public class Variable extends VariableObject implements ICDIVariable {
children = new Variable[vars.length];
for (int i = 0; i < vars.length; i++) {
String qName = getQualifiedName();
+ String childName = vars[i].getExp();
String childTypename = null;
boolean childFake = false;
ICDIType t = getType();
if (t instanceof ICDIArrayType) {
qName = "(" + getQualifiedName() + ")[" + i + "]";
+ // For Array gdb varobj only return the index, override here.
+ int index = castingIndex + i;
+ childName = getName() + "[" + index + "]";
} else if (t instanceof ICDIPointerType) {
qName = "*(" + getQualifiedName() + ")";
} else if (t instanceof ICDIStructType) {
@@ -201,8 +205,7 @@ public class Variable extends VariableObject implements ICDIVariable {
qName = "(" + getQualifiedName() + ")." + vars[i].getExp();
}
}
- Variable v =
- new Variable(getTarget(), vars[i].getExp(), qName, getStackFrame(), getPosition(), getStackDepth(), vars[i]);
+ Variable v = new Variable(getTarget(), childName, qName, getStackFrame(), getPosition(), getStackDepth(), vars[i]);
if (childTypename != null) {
// Hack to reset the typename to a known value
v.typename = childTypename;

Back to the top