Debugger: Remove verbose option of the debugger log.

Saves an asking for debugger log roundtrip when the information is just
visible in the verbose log. Was just used inside the cdbengine.

Change-Id: I9801d3ccd8f273c3b4afcf053b00e7af0953a63f
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
David Schulz
2016-03-17 12:58:50 +01:00
committed by hjk
parent 93c1840740
commit c1ad70087d
6 changed files with 4 additions and 44 deletions

View File

@@ -235,8 +235,6 @@ CdbEngine::CdbEngine(const DebuggerRunParameters &sp) :
m_extensionCommandPrefixBA("!" QT_CREATOR_CDB_EXT "."), m_extensionCommandPrefixBA("!" QT_CREATOR_CDB_EXT "."),
m_operateByInstructionPending(true), m_operateByInstructionPending(true),
m_operateByInstruction(true), // Default CDB setting m_operateByInstruction(true), // Default CDB setting
m_verboseLogPending(true),
m_verboseLog(false), // Default CDB setting
m_hasDebuggee(false), m_hasDebuggee(false),
m_wow64State(wow64Uninitialized), m_wow64State(wow64Uninitialized),
m_elapsedLogTime(0), m_elapsedLogTime(0),
@@ -249,8 +247,6 @@ CdbEngine::CdbEngine(const DebuggerRunParameters &sp) :
connect(action(OperateByInstruction), &QAction::triggered, connect(action(OperateByInstruction), &QAction::triggered,
this, &CdbEngine::operateByInstructionTriggered); this, &CdbEngine::operateByInstructionTriggered);
connect(action(VerboseLog), &QAction::triggered,
this, &CdbEngine::verboseLogTriggered);
connect(action(CreateFullBacktrace), &QAction::triggered, connect(action(CreateFullBacktrace), &QAction::triggered,
this, &CdbEngine::createFullBacktrace); this, &CdbEngine::createFullBacktrace);
connect(&m_process, static_cast<void(QProcess::*)(int)>(&QProcess::finished), connect(&m_process, static_cast<void(QProcess::*)(int)>(&QProcess::finished),
@@ -272,9 +268,7 @@ void CdbEngine::init()
m_nextCommandToken = 0; m_nextCommandToken = 0;
m_currentBuiltinResponseToken = -1; m_currentBuiltinResponseToken = -1;
m_operateByInstructionPending = action(OperateByInstruction)->isChecked(); m_operateByInstructionPending = action(OperateByInstruction)->isChecked();
m_verboseLogPending = boolSetting(VerboseLog);
m_operateByInstruction = true; // Default CDB setting m_operateByInstruction = true; // Default CDB setting
m_verboseLog = false; // Default CDB setting
m_hasDebuggee = false; m_hasDebuggee = false;
m_sourceStepInto = false; m_sourceStepInto = false;
m_watchPointX = m_watchPointY = 0; m_watchPointX = m_watchPointY = 0;
@@ -321,13 +315,6 @@ void CdbEngine::operateByInstructionTriggered(bool operateByInstruction)
syncOperateByInstruction(operateByInstruction); syncOperateByInstruction(operateByInstruction);
} }
void CdbEngine::verboseLogTriggered(bool verboseLog)
{
m_verboseLogPending = verboseLog;
if (state() == InferiorStopOk)
syncVerboseLog(verboseLog);
}
void CdbEngine::syncOperateByInstruction(bool operateByInstruction) void CdbEngine::syncOperateByInstruction(bool operateByInstruction)
{ {
if (debug) if (debug)
@@ -340,15 +327,6 @@ void CdbEngine::syncOperateByInstruction(bool operateByInstruction)
runCommand({m_operateByInstruction ? "l-s" : "l+s", NoFlags}); runCommand({m_operateByInstruction ? "l-s" : "l+s", NoFlags});
} }
void CdbEngine::syncVerboseLog(bool verboseLog)
{
if (m_verboseLog == verboseLog)
return;
QTC_ASSERT(m_accessible, return);
m_verboseLog = verboseLog;
runCommand({m_verboseLog ? "!sym noisy" : "!sym quiet", NoFlags});
}
bool CdbEngine::canHandleToolTip(const DebuggerToolTipContext &context) const bool CdbEngine::canHandleToolTip(const DebuggerToolTipContext &context) const
{ {
Q_UNUSED(context); Q_UNUSED(context);
@@ -664,6 +642,7 @@ void CdbEngine::setupInferior()
runCommand({cdbAddBreakpointCommand(bp, m_sourcePathMappings, id, true), BuiltinCommand, runCommand({cdbAddBreakpointCommand(bp, m_sourcePathMappings, id, true), BuiltinCommand,
[this, id](const DebuggerResponse &r) { handleBreakInsert(r, id); }}); [this, id](const DebuggerResponse &r) { handleBreakInsert(r, id); }});
} }
runCommand({"!sym noisy", NoFlags}); // Show symbol load information.
runCommand({"sxn 0x4000001f", NoFlags}); // Do not break on WowX86 exceptions. runCommand({"sxn 0x4000001f", NoFlags}); // Do not break on WowX86 exceptions.
runCommand({"sxn ibp", NoFlags}); // Do not break on initial breakpoints. runCommand({"sxn ibp", NoFlags}); // Do not break on initial breakpoints.
runCommand({".asm source_line", NoFlags}); // Source line in assembly runCommand({".asm source_line", NoFlags}); // Source line in assembly
@@ -1261,7 +1240,6 @@ void CdbEngine::doUpdateLocals(const UpdateParameters &updateParameters)
} }
} }
} }
if (boolSetting(VerboseLog))
str << blankSeparator << "-v"; str << blankSeparator << "-v";
if (boolSetting(UseDebuggingHelpers)) if (boolSetting(UseDebuggingHelpers))
str << blankSeparator << "-c"; str << blankSeparator << "-c";
@@ -1668,7 +1646,6 @@ void CdbEngine::handleRegistersExt(const DebuggerResponse &response)
void CdbEngine::handleLocals(const DebuggerResponse &response, bool partialUpdate) void CdbEngine::handleLocals(const DebuggerResponse &response, bool partialUpdate)
{ {
if (response.resultClass == ResultDone) { if (response.resultClass == ResultDone) {
if (boolSetting(VerboseLog))
showMessage(QLatin1String(response.data.toString()), LogDebug); showMessage(QLatin1String(response.data.toString()), LogDebug);
GdbMi partial; GdbMi partial;
@@ -1887,8 +1864,6 @@ void CdbEngine::handleSessionIdle(const QByteArray &messageBA)
elapsedLogTime(), messageBA.constData(), elapsedLogTime(), messageBA.constData(),
stateName(state()), m_specialStopMode); stateName(state()), m_specialStopMode);
syncVerboseLog(m_verboseLogPending);
// Switch source level debugging // Switch source level debugging
syncOperateByInstruction(m_operateByInstructionPending); syncOperateByInstruction(m_operateByInstructionPending);
@@ -2392,7 +2367,6 @@ void CdbEngine::parseOutputLine(QByteArray line)
command.function.data(), m_currentBuiltinResponseToken, command.function.data(), m_currentBuiltinResponseToken,
m_currentBuiltinResponse.count('\n'), m_commandForToken.size() - 1); m_currentBuiltinResponse.count('\n'), m_commandForToken.size() - 1);
QTC_ASSERT(token == m_currentBuiltinResponseToken, return); QTC_ASSERT(token == m_currentBuiltinResponseToken, return);
if (boolSetting(VerboseLog))
showMessage(QLatin1String(m_currentBuiltinResponse), LogMisc); showMessage(QLatin1String(m_currentBuiltinResponse), LogMisc);
if (command.callback) { if (command.callback) {
DebuggerResponse response; DebuggerResponse response;

View File

@@ -124,7 +124,6 @@ private slots:
void processFinished(); void processFinished();
void runCommand(const DebuggerCommand &cmd) override; void runCommand(const DebuggerCommand &cmd) override;
void operateByInstructionTriggered(bool); void operateByInstructionTriggered(bool);
void verboseLogTriggered(bool);
void consoleStubError(const QString &); void consoleStubError(const QString &);
void consoleStubProcessStarted(); void consoleStubProcessStarted();
@@ -184,7 +183,6 @@ private:
inline bool isCdbProcessRunning() const { return m_process.state() != QProcess::NotRunning; } inline bool isCdbProcessRunning() const { return m_process.state() != QProcess::NotRunning; }
bool canInterruptInferior() const; bool canInterruptInferior() const;
void syncOperateByInstruction(bool operateByInstruction); void syncOperateByInstruction(bool operateByInstruction);
void syncVerboseLog(bool verboseLog);
void postWidgetAtCommand(); void postWidgetAtCommand();
void handleCustomSpecialStop(const QVariant &v); void handleCustomSpecialStop(const QVariant &v);
void postFetchMemory(const MemoryViewCookie &c); void postFetchMemory(const MemoryViewCookie &c);
@@ -240,8 +238,6 @@ private:
const QByteArray m_extensionCommandPrefixBA; //!< Library name used as prefix const QByteArray m_extensionCommandPrefixBA; //!< Library name used as prefix
bool m_operateByInstructionPending; //!< Creator operate by instruction action changed. bool m_operateByInstructionPending; //!< Creator operate by instruction action changed.
bool m_operateByInstruction; bool m_operateByInstruction;
bool m_verboseLogPending; //!< Creator verbose log action changed.
bool m_verboseLog;
bool m_hasDebuggee; bool m_hasDebuggee;
enum Wow64State { enum Wow64State {
wow64Uninitialized, wow64Uninitialized,

View File

@@ -211,7 +211,6 @@ CommonOptionsPageWidget::CommonOptionsPageWidget
m_group->insert(action(ShowQObjectNames), 0); m_group->insert(action(ShowQObjectNames), 0);
m_group->insert(action(SortStructMembers), 0); m_group->insert(action(SortStructMembers), 0);
m_group->insert(action(LogTimeStamps), 0); m_group->insert(action(LogTimeStamps), 0);
m_group->insert(action(VerboseLog), 0);
m_group->insert(action(BreakOnThrow), 0); m_group->insert(action(BreakOnThrow), 0);
m_group->insert(action(BreakOnCatch), 0); m_group->insert(action(BreakOnCatch), 0);
if (Utils::HostOsInfo::isWindowsHost()) { if (Utils::HostOsInfo::isWindowsHost()) {

View File

@@ -161,13 +161,6 @@ DebuggerSettings::DebuggerSettings()
item->setDefaultValue(false); item->setDefaultValue(false);
insertItem(LogTimeStamps, item); insertItem(LogTimeStamps, item);
item = new SavedAction(this);
item->setText(tr("Verbose Log"));
item->setSettingsKey(debugModeGroup, QLatin1String("VerboseLog"));
item->setCheckable(true);
item->setDefaultValue(false);
insertItem(VerboseLog, item);
item = new SavedAction(this); item = new SavedAction(this);
item->setText(tr("Operate by Instruction")); item->setText(tr("Operate by Instruction"));
item->setCheckable(true); item->setCheckable(true);

View File

@@ -92,7 +92,6 @@ enum DebuggerActionCode
AutoQuit, AutoQuit,
LockView, LockView,
LogTimeStamps, LogTimeStamps,
VerboseLog,
OperateByInstruction, OperateByInstruction,
CloseSourceBuffersOnExit, CloseSourceBuffersOnExit,
CloseMemoryBuffersOnExit, CloseMemoryBuffersOnExit,

View File

@@ -175,7 +175,6 @@ public:
menu->addAction(m_clearContentsAction); menu->addAction(m_clearContentsAction);
menu->addAction(m_saveContentsAction); // X11 clipboard is unreliable for long texts menu->addAction(m_saveContentsAction); // X11 clipboard is unreliable for long texts
menu->addAction(action(LogTimeStamps)); menu->addAction(action(LogTimeStamps));
menu->addAction(action(VerboseLog));
menu->addAction(m_reloadDebuggingHelpersAction); menu->addAction(m_reloadDebuggingHelpersAction);
menu->addSeparator(); menu->addSeparator();
menu->addAction(action(SettingsDialog)); menu->addAction(action(SettingsDialog));