diff options
author | hjk <qtc-committer@nokia.com> | 2009-06-12 14:26:54 +0200 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2009-06-12 14:28:13 +0200 |
commit | 47d766d91f43e524f21088dc3c6c57a9c0b4bf91 (patch) | |
tree | 682f44a41445b24341c16e1bfe638e5e5df98019 | |
parent | 4eb11b1a240e1ba5d8eea312c6da2b3b918b3c7a (diff) |
debugger: kill the debugger if it is still running after it said it has died.
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 12 | ||||
-rw-r--r-- | tests/manual/gdbdebugger/simple/app.cpp | 3 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 27d44e6b228..7b4759ba605 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; } diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp index 349055c3b2a..cebc364c218 100644 --- a/tests/manual/gdbdebugger/simple/app.cpp +++ b/tests/manual/gdbdebugger/simple/app.cpp @@ -644,6 +644,9 @@ void testStdMap() gg[44] = 4; gg[55] = 5; +#endif + +#if 0 std::map<uint, QStringList> ggl; ggl[11] = QStringList() << "11"; ggl[22] = QStringList() << "22"; |