diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 27d44e6b228e7ab1bb326c66b83e19247a11a2e9..7b4759ba605a9f5ca71f48af2ad6a077993df711 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 349055c3b2ada198326b3e2d7e9b8d4f5f6de9b3..cebc364c2184e2ce4dad3ad4f5dd34da1629c108 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";