From 259f48a0b9851485b685a7da7f66c3b266046482 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Tue, 2 Aug 2016 16:11:25 -0400 Subject: [PATCH] In case of a hang, cleanup any gdb that was started After we start gdb we wait to read the gdb prompt "(gdb)". If we never get the prompt, we eventually timeout after 30 seconds. We then do some cleanup, but were not killing gdb if it was actually running. Change-Id: I4a84f1d9e07a358643e91d41d1ca30d876167aef --- .../src/org/eclipse/cdt/dsf/gdb/service/GDBBackend.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBackend.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBackend.java index ca4b48c9271..94ebb852dbe 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBackend.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBackend.java @@ -549,6 +549,9 @@ public class GDBBackend extends AbstractDsfService implements IGDBBackend, IMIBa if (jobThread != null) { jobThread.interrupt(); } + + destroy(); + requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.TARGET_REQUEST_FAILED, "Timed out trying to launch GDB.", null)); //$NON-NLS-1$ requestMonitor.done();