diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java index 621cd227945..d2d3218f6bb 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java @@ -99,6 +99,8 @@ public class GDBControl extends AbstractMIControl implements IGDBControl { private CLIEventProcessor fCLICommandProcessor; private AbstractCLIProcess fCLIProcess; + private boolean fTerminated; + /** * @since 3.0 */ @@ -176,6 +178,12 @@ public class GDBControl extends AbstractMIControl implements IGDBControl { } public void terminate(final RequestMonitor rm) { + if (fTerminated) { + rm.done(); + return; + } + fTerminated = true; + // To fix bug 234467: // Interrupt GDB in case the inferior is running. // That way, the inferior will also be killed when we exit GDB. diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_0.java index f8e050c4363..f098ca7d0b2 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_0.java @@ -103,6 +103,8 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl { private List fFeatures = new ArrayList(); + private boolean fTerminated; + /** * @since 3.0 */ @@ -181,7 +183,13 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl { } public void terminate(final RequestMonitor rm) { - // To fix bug 234467: + if (fTerminated) { + rm.done(); + return; + } + fTerminated = true; + + // To fix bug 234467: // Interrupt GDB in case the inferior is running. // That way, the inferior will also be killed when we exit GDB. //