summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2009-06-12 14:26:54 +0200
committerhjk <qtc-committer@nokia.com>2009-06-12 14:28:13 +0200
commit47d766d91f43e524f21088dc3c6c57a9c0b4bf91 (patch)
tree682f44a41445b24341c16e1bfe638e5e5df98019 /src
parent4eb11b1a240e1ba5d8eea312c6da2b3b918b3c7a (diff)
downloadqt-creator-47d766d91f43e524f21088dc3c6c57a9c0b4bf91.tar.gz
debugger: kill the debugger if it is still running after it said it has died.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp12
1 files changed, 8 insertions, 4 deletions
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<DebuggerStartParameters> &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;
}