mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 11:15:38 +02:00
Old gdb mi uses a List instead of Tuple try to cope.
This commit is contained in:
parent
e8a221b7de
commit
5c11e9f0a3
1 changed files with 16 additions and 0 deletions
|
@ -39,6 +39,8 @@ public class MIStackListFramesInfo extends MIInfo {
|
||||||
MIValue val = results[i].getMIValue();
|
MIValue val = results[i].getMIValue();
|
||||||
if (val instanceof MIList) {
|
if (val instanceof MIList) {
|
||||||
parseStack((MIList)val, aList);
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue