mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +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
|
2004-11-26 Alain Magloire
|
||||||
Make the deferred breakpoint on by default.
|
Make the deferred breakpoint on by default.
|
||||||
* cdi/org/eclipose/cdt/debug/mi/core/cdi/SharedLibraryManager.java
|
* 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$
|
} else if (var.equals("children")) { //$NON-NLS-1$
|
||||||
if (value instanceof MITuple) {
|
parseChildren(value, aList);
|
||||||
parseChildren((MITuple)value, aList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,8 +61,19 @@ public class MIVarListChildrenInfo extends MIInfo {
|
||||||
children = (MIVar[])aList.toArray(new MIVar[aList.size()]);
|
children = (MIVar[])aList.toArray(new MIVar[aList.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void parseChildren(MITuple tuple, List aList) {
|
/*
|
||||||
MIResult[] results = tuple.getMIResults();
|
* 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++) {
|
for (int i = 0; i < results.length; i++) {
|
||||||
String var = results[i].getVariable();
|
String var = results[i].getVariable();
|
||||||
if (var.equals("child")) { //$NON-NLS-1$
|
if (var.equals("child")) { //$NON-NLS-1$
|
||||||
|
@ -75,4 +84,5 @@ public class MIVarListChildrenInfo extends MIInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue