diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java index c4941601740..40b96c68b6c 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java @@ -1153,7 +1153,13 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService implements IMIRunCo // If we don't, we risk an infinite loop where we try, over and over // to perform an operation that keeps on failing. fOngoingOperation = false; - fOperationsPending.clear(); + + // Complete each rm of the cancelled operations + while (fOperationsPending.size() > 0) { + RequestMonitor rm = fOperationsPending.poll().rm; + rm.setStatus(getStatus()); + rm.done(); + } super.handleFailure(); } }; diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java index cff1b912c76..05784080df2 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java @@ -1156,7 +1156,14 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I // If we don't, we risk an infinite loop where we try, over and over // to perform an operation that keeps on failing. fOngoingOperation = false; - fOperationsPending.clear(); + + // Complete each rm of the cancelled operations + while (fOperationsPending.size() > 0) { + RequestMonitor rm = fOperationsPending.poll().rm; + rm.setStatus(getStatus()); + rm.done(); + } + super.handleFailure(); } };