From 8e355ea4b2790f0022bb32008803de13e4933710 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Wed, 26 Jan 2011 19:00:17 +0000 Subject: [PATCH] Bug 334329 - Launch is not marked as 'terminated' when program exits. --- .../src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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();