From 42e4cbf9284490f003ea986c567b7b34a9a816aa Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Sat, 7 Sep 2002 14:48:26 +0000 Subject: [PATCH] Try to detect when gdb dies unexpectely(sp?). --- .../eclipse/cdt/debug/mi/core/RxThread.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/RxThread.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/RxThread.java index 129e84bf050..34266fde47e 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/RxThread.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/RxThread.java @@ -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(); } }