diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 587400f5eb5..b2489facf1e 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -346,7 +346,9 @@ CdbEngine::CdbEngine(const DebuggerStartParameters &sp) : m_currentBuiltinCommandIndex(-1), m_extensionCommandPrefixBA("!" QT_CREATOR_CDB_EXT "."), m_operateByInstructionPending(true), + m_verboseLogPending(true), m_operateByInstruction(true), // Default CDB setting + m_verboseLog(false), // Default CDB setting m_notifyEngineShutdownOnTermination(false), m_hasDebuggee(false), m_cdbIs64Bit(false), @@ -359,7 +361,8 @@ CdbEngine::CdbEngine(const DebuggerStartParameters &sp) : { connect(debuggerCore()->action(OperateByInstruction), SIGNAL(triggered(bool)), this, SLOT(operateByInstructionTriggered(bool))); - + connect(debuggerCore()->action(VerboseLog), SIGNAL(triggered(bool)), + this, SLOT(verboseLogTriggered(bool))); setObjectName(QLatin1String("CdbEngine")); connect(&m_process, SIGNAL(finished(int)), this, SLOT(processFinished())); connect(&m_process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError())); @@ -376,7 +379,9 @@ void CdbEngine::init() m_nextCommandToken = 0; m_currentBuiltinCommandIndex = -1; m_operateByInstructionPending = debuggerCore()->action(OperateByInstruction)->isChecked(); + m_verboseLogPending = debuggerCore()->boolSetting(VerboseLog); m_operateByInstruction = true; // Default CDB setting + m_verboseLog = false; // Default CDB setting m_notifyEngineShutdownOnTermination = false; m_hasDebuggee = false; m_sourceStepInto = false; @@ -423,6 +428,13 @@ void CdbEngine::operateByInstructionTriggered(bool operateByInstruction) syncOperateByInstruction(operateByInstruction); } +void CdbEngine::verboseLogTriggered(bool verboseLog) +{ + m_verboseLogPending = verboseLog; + if (state() == InferiorStopOk) + syncVerboseLog(verboseLog); +} + void CdbEngine::syncOperateByInstruction(bool operateByInstruction) { if (debug) @@ -435,6 +447,15 @@ void CdbEngine::syncOperateByInstruction(bool operateByInstruction) postCommand(m_operateByInstruction ? QByteArray("l-s") : QByteArray("l+s"), 0); } +void CdbEngine::syncVerboseLog(bool verboseLog) +{ + if (m_verboseLog == verboseLog) + return; + QTC_ASSERT(m_accessible, return); + m_verboseLog = verboseLog; + postCommand(m_verboseLog ? QByteArray("!sym noisy") : QByteArray("!sym quiet"), 0); +} + bool CdbEngine::setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, const DebuggerToolTipContext &contextIn) @@ -2120,6 +2141,8 @@ void CdbEngine::handleSessionIdle(const QByteArray &messageBA) elapsedLogTime(), messageBA.constData(), stateName(state()), m_specialStopMode); + syncVerboseLog(m_verboseLogPending); + // Switch source level debugging syncOperateByInstruction(m_operateByInstructionPending); diff --git a/src/plugins/debugger/cdb/cdbengine.h b/src/plugins/debugger/cdb/cdbengine.h index 4478af3c3b1..48af1aa464c 100644 --- a/src/plugins/debugger/cdb/cdbengine.h +++ b/src/plugins/debugger/cdb/cdbengine.h @@ -148,6 +148,7 @@ private slots: void postCommandSequence(unsigned mask); void operateByInstructionTriggered(bool); + void verboseLogTriggered(bool); void consoleStubError(const QString &); void consoleStubProcessStarted(); @@ -199,6 +200,7 @@ private: inline bool isCdbProcessRunning() const { return m_process.state() != QProcess::NotRunning; } bool canInterruptInferior() const; void syncOperateByInstruction(bool operateByInstruction); + void syncVerboseLog(bool verboseLog); void postWidgetAtCommand(); void handleCustomSpecialStop(const QVariant &v); void postFetchMemory(const MemoryViewCookie &c); @@ -260,6 +262,8 @@ private: const QByteArray m_extensionCommandPrefixBA; //!< Library name used as prefix bool m_operateByInstructionPending; //!< Creator operate by instruction action changed. bool m_operateByInstruction; + bool m_verboseLogPending; //!< Creator verbose log action changed. + bool m_verboseLog; bool m_notifyEngineShutdownOnTermination; bool m_hasDebuggee; bool m_cdbIs64Bit;