mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
name of the Array.
This commit is contained in:
parent
a31b9f5d4f
commit
bf1f86abc1
1 changed files with 5 additions and 2 deletions
|
@ -165,11 +165,15 @@ public class Variable extends VariableObject implements ICDIVariable {
|
||||||
children = new Variable[vars.length];
|
children = new Variable[vars.length];
|
||||||
for (int i = 0; i < vars.length; i++) {
|
for (int i = 0; i < vars.length; i++) {
|
||||||
String qName = getQualifiedName();
|
String qName = getQualifiedName();
|
||||||
|
String childName = vars[i].getExp();
|
||||||
String childTypename = null;
|
String childTypename = null;
|
||||||
boolean childFake = false;
|
boolean childFake = false;
|
||||||
ICDIType t = getType();
|
ICDIType t = getType();
|
||||||
if (t instanceof ICDIArrayType) {
|
if (t instanceof ICDIArrayType) {
|
||||||
qName = "(" + getQualifiedName() + ")[" + i + "]";
|
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) {
|
} else if (t instanceof ICDIPointerType) {
|
||||||
qName = "*(" + getQualifiedName() + ")";
|
qName = "*(" + getQualifiedName() + ")";
|
||||||
} else if (t instanceof ICDIStructType) {
|
} else if (t instanceof ICDIStructType) {
|
||||||
|
@ -201,8 +205,7 @@ public class Variable extends VariableObject implements ICDIVariable {
|
||||||
qName = "(" + getQualifiedName() + ")." + vars[i].getExp();
|
qName = "(" + getQualifiedName() + ")." + vars[i].getExp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Variable v =
|
Variable v = new Variable(getTarget(), childName, qName, getStackFrame(), getPosition(), getStackDepth(), vars[i]);
|
||||||
new Variable(getTarget(), vars[i].getExp(), qName, getStackFrame(), getPosition(), getStackDepth(), vars[i]);
|
|
||||||
if (childTypename != null) {
|
if (childTypename != null) {
|
||||||
// Hack to reset the typename to a known value
|
// Hack to reset the typename to a known value
|
||||||
v.typename = childTypename;
|
v.typename = childTypename;
|
||||||
|
|
Loading…
Add table
Reference in a new issue