1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 01:15:29 +02:00

Old gdb mi uses a List instead of Tuple try to cope.

This commit is contained in:
Alain Magloire 2002-08-15 20:32:44 +00:00
parent e8a221b7de
commit 5c11e9f0a3

View file

@ -39,6 +39,8 @@ public class MIStackListFramesInfo extends MIInfo {
MIValue val = results[i].getMIValue();
if (val instanceof MIList) {
parseStack((MIList)val, aList);
} else if (val instanceof MITuple) {
parseStack((MITuple)val, aList);
}
}
}
@ -59,4 +61,18 @@ public class MIStackListFramesInfo extends MIInfo {
}
}
}
// Old gdb use tuple instead of a list.
void parseStack(MITuple tuple, List aList) {
MIResult[] results = tuple.getMIResults();
for (int i = 0; i < results.length; i++) {
String var = results[i].getVariable();
if (var.equals("frame")) {
MIValue value = results[i].getMIValue();
if (value instanceof MITuple) {
aList.add (new MIFrame((MITuple)value));
}
}
}
}
}