mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Try to detect when gdb dies unexpectely(sp?).
This commit is contained in:
parent
c437685dfd
commit
42e4cbf928
1 changed files with 16 additions and 16 deletions
|
@ -73,22 +73,22 @@ MIPlugin.getDefault().debugLog(line);
|
|||
}
|
||||
} catch (IOException e) {
|
||||
//e.printStackTrace();
|
||||
// This code should be executed when gdb been abruptly
|
||||
// or unxepectedly killed. This is detected by checking
|
||||
// if the channelInputStream is not null. In normal case
|
||||
// session.terminate() will set the channelInputStream to null.
|
||||
if (session.getChannelInputStream() != null) {
|
||||
Runnable cleanup = new Runnable() {
|
||||
public void run() {
|
||||
// Change the state of the inferior.
|
||||
session.getMIInferior().setTerminated();
|
||||
session.terminate();
|
||||
}
|
||||
};
|
||||
Thread clean = new Thread(cleanup, "GDB Died");
|
||||
clean.setDaemon(true);
|
||||
clean.start();
|
||||
}
|
||||
}
|
||||
// This code should be executed when gdb been abruptly
|
||||
// or unxepectedly killed. This is detected by checking
|
||||
// if the channelInputStream is not null. In normal case
|
||||
// session.terminate() will set the channelInputStream to null.
|
||||
if (session.getChannelInputStream() != null) {
|
||||
Runnable cleanup = new Runnable() {
|
||||
public void run() {
|
||||
// Change the state of the inferior.
|
||||
session.getMIInferior().setTerminated();
|
||||
session.terminate();
|
||||
}
|
||||
};
|
||||
Thread clean = new Thread(cleanup, "GDB Died");
|
||||
clean.setDaemon(true);
|
||||
clean.start();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue