Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2010-01-06 21:24:39 +0000
committerMarc Khouzam2010-01-06 21:24:39 +0000
commit78333eb3ab218c58f8c8a927d7d9c0e7e1e959f2 (patch)
tree2e94294cdfeee66beddeeb40195b213d231862b0
parent688c2237f608ac4011617117e4034a646f225967 (diff)
downloadorg.eclipse.cdt-78333eb3ab218c58f8c8a927d7d9c0e7e1e959f2.tar.gz
org.eclipse.cdt-78333eb3ab218c58f8c8a927d7d9c0e7e1e959f2.tar.xz
org.eclipse.cdt-78333eb3ab218c58f8c8a927d7d9c0e7e1e959f2.zip
[250037] Fix to help support OS X debugging
-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