[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] GDB/MI Array improvoments
|
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/ChangeLog,v
retrieving revision 1.166
diff -u -r1.166 ChangeLog
--- ChangeLog 20 Aug 2003 15:48:48 -0000 1.166
+++ ChangeLog 21 Aug 2003 14:43:14 -0000
@@ -1,3 +1,14 @@
+2003-08-21 Alain Magloire
+
+ GDB varobj for the arrays children name only returns
+ the index. We need to construct the entire name:
+ char buffer[2]
+ GDB return "0", "1" for the children names.
+ We will return
+ "buffer[0]", "buffer[1]"
+
+ * src/org/eclipse/cdt/debug/mi/core/cdi/Variable.java
+
2003-08-20 Alain Magloire
GDB/MI altough define an interface that all commands should
Index: src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java,v
retrieving revision 1.19
diff -u -r1.19 Variable.java
--- src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java 19 Aug 2003 20:55:58 -0000 1.19
+++ src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java 21 Aug 2003 14:43:14 -0000
@@ -165,11 +165,15 @@
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 @@
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;