From 0eca1500311d627547b9f2373d25f389eaacf372 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Date: Thu, 8 Oct 2009 13:47:56 +0200 Subject: [PATCH] debug output: don't claim "continuing after temporary stop" if we are not --- src/plugins/debugger/gdb/gdbengine.cpp | 19 +++++++++++++++---- src/plugins/debugger/gdb/gdbengine.h | 2 ++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index d2e3db5c9cd..f12a6df68c3 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -843,10 +843,10 @@ void GdbEngine::handleResultRecord(const GdbResponse &response) // event loop is entered, and let individual commands have a flag to suppress // that behavior. if (m_commandsDoneCallback && m_cookieForToken.isEmpty()) { + debugMessage(_("ALL COMMANDS DONE; INVOKING CALLBACK")); CommandsDoneCallback cont = m_commandsDoneCallback; m_commandsDoneCallback = 0; (this->*cont)(); - showStatusMessage(tr("Continuing after temporary stop."), 1000); } else { PENDING_DEBUG("MISSING TOKENS: " << m_cookieForToken.keys()); } @@ -1047,7 +1047,7 @@ void GdbEngine::handleAsyncOutput(const GdbMi &data) } showStatusMessage(tr("Processing queued commands."), 1000); QTC_ASSERT(m_commandsDoneCallback == 0, /**/); - m_commandsDoneCallback = &GdbEngine::continueInferior; + m_commandsDoneCallback = &GdbEngine::autoContinueInferior; return; } @@ -1476,16 +1476,27 @@ void GdbEngine::startDebugger(const DebuggerStartParametersPtr &sp) m_gdbAdapter->startAdapter(); } -void GdbEngine::continueInferior() +void GdbEngine::continueInferiorInternal() { QTC_ASSERT(state() == InferiorStopped, qDebug() << state()); m_manager->resetLocation(); setTokenBarrier(); setState(InferiorRunningRequested); - showStatusMessage(tr("Running requested..."), 5000); postCommand(_("-exec-continue"), CB(handleExecContinue)); } +void GdbEngine::autoContinueInferior() +{ + continueInferiorInternal(); + showStatusMessage(tr("Continuing after temporary stop..."), 1000); +} + +void GdbEngine::continueInferior() +{ + continueInferiorInternal(); + showStatusMessage(tr("Running requested..."), 5000); +} + void GdbEngine::stepExec() { QTC_ASSERT(state() == InferiorStopped, qDebug() << state()); diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index 3df5bc46fa4..dc019ea5117 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -115,6 +115,8 @@ private: void exitDebugger(); void detachDebugger(); + void continueInferiorInternal(); + void autoContinueInferior(); void continueInferior(); void interruptInferior(); -- GitLab