From 47d766d91f43e524f21088dc3c6c57a9c0b4bf91 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 12 Jun 2009 14:26:54 +0200 Subject: debugger: kill the debugger if it is still running after it said it has died. --- src/plugins/debugger/gdb/gdbengine.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 27d44e6b22..7b4759ba60 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1311,7 +1311,7 @@ void GdbEngine::detachDebugger() void GdbEngine::exitDebugger() { - debugMessage(_("GDBENGINE EXITDEBUFFER: %1").arg(m_gdbProc.state())); + debugMessage(_("GDBENGINE EXITDEBUGGER: %1").arg(m_gdbProc.state())); if (m_gdbProc.state() == QProcess::Starting) { debugMessage(_("WAITING FOR GDB STARTUP TO SHUTDOWN: %1") .arg(m_gdbProc.state())); @@ -1340,8 +1340,11 @@ void GdbEngine::exitDebugger() m_gdbProc.waitForFinished(20000); } } - if (m_gdbProc.state() != QProcess::NotRunning) - debugMessage(_("PROBLEM STOPPING DEBUGGER")); + if (m_gdbProc.state() != QProcess::NotRunning) { + debugMessage(_("PROBLEM STOPPING DEBUGGER: STATE %1") + .arg(m_gdbProc.state())); + m_gdbProc.kill(); + } m_outputCollector.shutdown(); initializeVariables(); @@ -1360,7 +1363,8 @@ bool GdbEngine::startDebugger(const QSharedPointer &sp) QStringList gdbArgs; if (m_gdbProc.state() != QProcess::NotRunning) { - debugMessage(_("GDB IS ALREADY RUNNING!")); + debugMessage(_("GDB IS ALREADY RUNNING, STATE: %1").arg(m_gdbProc.state())); + m_gdbProc.kill(); return false; } -- cgit v1.2.1