diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java index e7af31e3f30..6957dc22322 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java @@ -293,7 +293,14 @@ public class GdbLaunch extends DsfLaunch // 283586 DebugPlugin.getDefault().fireDebugEventSet( new DebugEvent[] { new DebugEvent(fMemRetrieval, DebugEvent.TERMINATE) }); - fireTerminate(); + // 'fireTerminate()' removes this launch from the list of 'DebugEvent' + // listeners. The launch may not be terminated at this point: the inferior + // and gdb processes are monitored in separate threads. This will prevent + // updating of some of the Debug view actions. + // 'DebugEvent.TERMINATE' will be fired when each of the corresponding processes + // exits and handled by 'handleDebugEvents()' method. + if (isTerminated()) + fireTerminate(); rm.setStatus(getStatus()); rm.done();