Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MISession.java')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MISession.java36
1 files changed, 27 insertions, 9 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MISession.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MISession.java
index 9cc6f531a7d..fa9af09a30b 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MISession.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MISession.java
@@ -136,17 +136,35 @@ public class MISession extends Observable {
// Disable a certain number of irritations from gdb.
// Like confirmation and screen size.
- MIGDBSet confirm = new MIGDBSet(new String[]{"confirm", "off"});
- postCommand(confirm, launchTimeout);
- confirm.getMIInfo();
+ try {
+ MIGDBSet confirm = new MIGDBSet(new String[]{"confirm", "off"});
+ postCommand(confirm, launchTimeout);
+ confirm.getMIInfo();
+
+ MIGDBSet width = new MIGDBSet(new String[]{"width", "0"});
+ postCommand(width, launchTimeout);
+ confirm.getMIInfo();
- MIGDBSet width = new MIGDBSet(new String[]{"width", "0"});
- postCommand(width, launchTimeout);
- confirm.getMIInfo();
+ MIGDBSet height = new MIGDBSet(new String[]{"height", "0"});
+ postCommand(height, launchTimeout);
+ confirm.getMIInfo();
- MIGDBSet height = new MIGDBSet(new String[]{"height", "0"});
- postCommand(height, launchTimeout);
- confirm.getMIInfo();
+ } catch (MIException exc) {
+ // Kill the Transmition thread.
+ if (txThread.isAlive()) {
+ txThread.interrupt();
+ }
+ // Kill the Receiving Thread.
+ if (rxThread.isAlive()) {
+ rxThread.interrupt();
+ }
+ // Kill the event Thread.
+ if (eventThread.isAlive()) {
+ eventThread.interrupt();
+ }
+ // rethrow up the exception.
+ throw exc;
+ }
}
/**

Back to the top