Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarUpdate.java3
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarUpdateInfo.java16
2 files changed, 18 insertions, 1 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarUpdate.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarUpdate.java
index 535381a92f6..2569d902924 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarUpdate.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIVarUpdate.java
@@ -35,7 +35,8 @@ public class MIVarUpdate extends MICommand<MIVarUpdateInfo> {
* @since 1.1
*/
public MIVarUpdate(ICommandControlDMContext dmc, String name) {
- super(dmc, "-var-update", new String[] { "1", name }); //$NON-NLS-1$//$NON-NLS-2$
+ // Don't use the number parameters but use the full name '--all-values' for Apple gdb to work (bug 250037)
+ super(dmc, "-var-update", new String[] { "--all-values", name }); //$NON-NLS-1$//$NON-NLS-2$
}
@Override
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarUpdateInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarUpdateInfo.java
index e0953c62108..eb62c99beac 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarUpdateInfo.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarUpdateInfo.java
@@ -64,6 +64,22 @@ public class MIVarUpdateInfo extends MIInfo {
parseChangeList((MIList)values[i], aList);
}
}
+
+ // The MIList in Apple gdb contains MIResults instead of MIValues. It looks like:
+ // ^done,changelist=[varobj={name="var1",in_scope="true",type_changed="false"}],time={.....}
+ // Bug 250037
+ MIResult[] results = miList.getMIResults();
+ for (int i = 0; i < results.length; i++) {
+ String var = results[i].getVariable();
+ if (var.equals("varobj")) { //$NON-NLS-1$
+ MIValue value = results[i].getMIValue();
+ if (value instanceof MITuple) {
+ parseChangeList((MITuple)value, aList);
+ } else if (value instanceof MIList) {
+ parseChangeList((MIList)value, aList);
+ }
+ }
+ }
}
void parseChangeList(MITuple tuple, List<MIVarChange> aList) {

Back to the top