1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 345018: Do not allow to try to terminate GDB more than once

This commit is contained in:
Marc Khouzam 2011-05-06 19:27:55 +00:00
parent f0813190d4
commit e6ff1c5bd7
2 changed files with 17 additions and 1 deletions

View file

@ -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.

View file

@ -103,6 +103,8 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
private List<String> fFeatures = new ArrayList<String>();
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.
//