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:
parent
f0813190d4
commit
e6ff1c5bd7
2 changed files with 17 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue