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 ff3c6a446ad..d7a97edbeea 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 @@ -1529,12 +1529,18 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService implements IMIRunCo return; } + MIThreadRunState threadState = fThreadRunStates.get(e.getDMContext()); + if (threadState != null && threadState.fLatestEvent instanceof IResumedDMEvent) { + // Ignore multiple running events in a row. They will only slow down the UI + // for no added value. + return; + } + if (fRunToLineActiveOperation == null && fStepInToSelectionActiveOperation == null) { // No special case here, i.e. send notification getSession().dispatchEvent(new ResumedEvent(e.getDMContext(), e), getProperties()); } else { // Either RunToLine or StepIntoSelection operations are active - MIThreadRunState threadState = fThreadRunStates.get(e.getDMContext()); if (threadState == null || threadState.fLatestEvent instanceof ISuspendedDMEvent) { // Need to send out Running event notification, only once per operation, then a stop event is expected // at the end of the operation 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 1485b45e880..77eaf6f72be 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 @@ -482,13 +482,19 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I * @noreference This method is not intended to be referenced by clients. */ @DsfServiceEventHandler - public void eventDispatched(final MIRunningEvent e) { + public void eventDispatched(MIRunningEvent e) { if (fDisableNextRunningEvent) { fDisableNextRunningEvent = false; // We don't broadcast this running event return; } + if (fLatestEvent instanceof IResumedDMEvent) { + // Ignore multiple running events in a row. They will only slow down the UI + // for no added value. + return; + } + IDMEvent event = null; // Find the container context, which is used in multi-threaded debugging. IContainerDMContext containerDmc = DMContexts.getAncestorOfType(e.getDMContext(), IContainerDMContext.class);