From ae3ac786e0a1994aa0922aeccd46cf857f7097c8 Mon Sep 17 00:00:00 2001 From: hjk <qtc-committer@nokia.com> Date: Mon, 29 Jun 2009 13:28:01 +0200 Subject: [PATCH] debugger: fix problem where a manual 'continue' was needed after start up. The problem was that the 'emptyness' of m_cookieForToken was used as an indication that there was no response packet still in the air. However, this hash was not reset after a debugging session was aborted using S-F5, so it could contain items from a previous run, effectively preventing automatic triggering of the necessary 'continue'. --- src/plugins/debugger/gdb/gdbengine.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 15c75713049..88c93a08e54 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -198,6 +198,7 @@ void GdbEngine::initializeVariables() m_autoContinue = false; m_waitingForFirstBreakpointToBeHit = false; m_commandsToRunOnTemporaryBreak.clear(); + m_cookieForToken.clear(); } void GdbEngine::gdbProcError(QProcess::ProcessError error) @@ -1361,6 +1362,10 @@ int GdbEngine::currentFrame() const bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp) { + // This should be set by the constructor or in exitDebugger(). + QTC_ASSERT(m_debuggingHelperState == DebuggingHelperUninitialized, + initializeVariables()); + debugMessage(DebuggerSettings::instance()->dump()); QStringList gdbArgs; -- GitLab