mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
2004-12-20 Alain Magloire
Fix for PR 81019 for MacOsX * mi/org/eclipse/cdt/debug/mi/core/output/MIVarListChildrenInfo.java
This commit is contained in:
parent
5a4e52df7a
commit
0d24c79313
2 changed files with 25 additions and 11 deletions
|
@ -1,3 +1,7 @@
|
|||
2004-12-20 Alain Magloire
|
||||
Fix for PR 81019 for MacOsX
|
||||
* mi/org/eclipse/cdt/debug/mi/core/output/MIVarListChildrenInfo.java
|
||||
|
||||
2004-11-26 Alain Magloire
|
||||
Make the deferred breakpoint on by default.
|
||||
* cdi/org/eclipose/cdt/debug/mi/core/cdi/SharedLibraryManager.java
|
||||
|
|
|
@ -53,9 +53,7 @@ public class MIVarListChildrenInfo extends MIInfo {
|
|||
}
|
||||
}
|
||||
} else if (var.equals("children")) { //$NON-NLS-1$
|
||||
if (value instanceof MITuple) {
|
||||
parseChildren((MITuple)value, aList);
|
||||
}
|
||||
parseChildren(value, aList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,14 +61,26 @@ public class MIVarListChildrenInfo extends MIInfo {
|
|||
children = (MIVar[])aList.toArray(new MIVar[aList.size()]);
|
||||
}
|
||||
|
||||
void parseChildren(MITuple tuple, List aList) {
|
||||
MIResult[] results = tuple.getMIResults();
|
||||
for (int i = 0; i < results.length; i++) {
|
||||
String var = results[i].getVariable();
|
||||
if (var.equals("child")) { //$NON-NLS-1$
|
||||
MIValue value = results[i].getMIValue();
|
||||
if (value instanceof MITuple) {
|
||||
aList.add(new MIVar((MITuple)value));
|
||||
/*
|
||||
* Some gdb MacOSX do not return a MITuple so we have
|
||||
* to check for different format.
|
||||
* See PR 81019
|
||||
*/
|
||||
void parseChildren(MIValue val, List aList) {
|
||||
MIResult[] results = null;
|
||||
if (val instanceof MITuple) {
|
||||
results = ((MITuple)val).getMIResults();
|
||||
} else if (val instanceof MIList) {
|
||||
results = ((MIList)val).getMIResults();
|
||||
}
|
||||
if (results != null) {
|
||||
for (int i = 0; i < results.length; i++) {
|
||||
String var = results[i].getVariable();
|
||||
if (var.equals("child")) { //$NON-NLS-1$
|
||||
MIValue value = results[i].getMIValue();
|
||||
if (value instanceof MITuple) {
|
||||
aList.add(new MIVar((MITuple)value));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue