From fd2bf97f8278c5d2cf45e225b617e80beccdd75f Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 6 Feb 2017 12:10:02 +0100 Subject: [PATCH] Debugger: Remove the "Attempt quick start option" This was GDB-only. It complicates the startup mechanism including breaking certain setups (e.g. users manually controlling "set auto-solib-add" in their .gdbinit) without providing too much benefit (anymore). Part of the potential debugger startup time improvements that were possibly gained by the feature are nowadays available by using a release build *without* debug info, as one of the original reasons to not use that (making Qt type introspection hard/impossible) is largely gone with 4.2+. Change-Id: Iffb34e0035f39ad74b24bf025749b546f25a489b Reviewed-by: Christian Stenger --- src/plugins/debugger/debuggeractions.cpp | 6 ---- src/plugins/debugger/debuggeractions.h | 1 - src/plugins/debugger/gdb/gdbengine.cpp | 34 +-------------------- src/plugins/debugger/gdb/gdbengine.h | 4 --- src/plugins/debugger/gdb/gdboptionspage.cpp | 9 ------ 5 files changed, 1 insertion(+), 53 deletions(-) diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp index 548cec0555b..f56765d155d 100644 --- a/src/plugins/debugger/debuggeractions.cpp +++ b/src/plugins/debugger/debuggeractions.cpp @@ -482,12 +482,6 @@ DebuggerSettings::DebuggerSettings() item->setDefaultValue(false); insertItem(AutoQuit, item); - item = new SavedAction(this); - item->setSettingsKey(debugModeGroup, QLatin1String("AttemptQuickStart")); - item->setCheckable(true); - item->setDefaultValue(false); - insertItem(AttemptQuickStart, item); - item = new SavedAction(this); item->setSettingsKey(debugModeGroup, QLatin1String("MultiInferior")); item->setCheckable(true); diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h index e6bc2e9c4f3..f10255f1512 100644 --- a/src/plugins/debugger/debuggeractions.h +++ b/src/plugins/debugger/debuggeractions.h @@ -122,7 +122,6 @@ enum DebuggerActionCode // Gdb LoadGdbInit, LoadGdbDumpers, - AttemptQuickStart, GdbStartupCommands, GdbPostAttachCommands, GdbWatchdogTimeout, diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 504474e3a20..2009d96bb08 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -217,7 +217,6 @@ GdbEngine::GdbEngine(const DebuggerRunParameters &startParameters) m_commandsDoneCallback = 0; m_stackNeeded = false; m_terminalTrap = startParameters.useTerminal; - m_fullStartDone = false; m_systemDumpersLoaded = false; m_rerunPending = false; m_inUpdateLocals = false; @@ -1382,14 +1381,6 @@ void GdbEngine::handleStopResponse(const GdbMi &data) return; } - bool gotoHandleStop1 = true; - if (!m_fullStartDone) { - m_fullStartDone = true; - runCommand({"sharedlibrary .*", - [this, data](const DebuggerResponse &) { handleStop1(data); }}); - gotoHandleStop1 = false; - } - BreakpointResponseId rid(data["bkptno"].data()); int lineNumber = 0; QString fullName; @@ -1468,8 +1459,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data) CHECK_STATE(InferiorStopOk); - if (gotoHandleStop1) - handleStop1(data); + handleStop1(data); } static QString stopSignal(const Abi &abi) @@ -4024,12 +4014,6 @@ void GdbEngine::startGdb(const QStringList &args) //QByteArray ba = QFileInfo(sp.dumperLibrary).path().toLocal8Bit(); //if (!ba.isEmpty()) // runCommand("set solib-search-path " + ba); - if (attemptQuickStart()) { - runCommand({"set auto-solib-add off", ConsoleCommand}); - } else { - m_fullStartDone = true; - runCommand({"set auto-solib-add on", ConsoleCommand}); - } if (boolSetting(MultiInferior) || runParameters().multiProcess) { //runCommand("set follow-exec-mode new"); @@ -4362,22 +4346,6 @@ void GdbEngine::requestDebugInformation(const DebugInfoTask &task) QProcess::startDetached(task.command); } -bool GdbEngine::attemptQuickStart() const -{ - // Don't try if the user does not ask for it. - if (!boolSetting(AttemptQuickStart)) - return false; - - // Don't try if there are breakpoints we might be able to handle. - BreakHandler *handler = breakHandler(); - foreach (Breakpoint bp, handler->unclaimedBreakpoints()) { - if (acceptsBreakpoint(bp)) - return false; - } - - return true; -} - void GdbEngine::write(const QByteArray &data) { m_gdbProc.write(data); diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index b60b3df2c09..b9ac231da38 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -407,10 +407,6 @@ protected: void requestDebugInformation(const DebugInfoTask &task); DebugInfoTaskHandler *m_debugInfoTaskHandler; - // Indicates whether we had at least one full attempt to load - // debug information. - bool attemptQuickStart() const; - bool m_fullStartDone; bool m_systemDumpersLoaded; static QString msgGdbStopFailed(const QString &why); diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp index d1fcb22b1b3..2a29e5a498a 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.cpp +++ b/src/plugins/debugger/gdb/gdboptionspage.cpp @@ -392,13 +392,6 @@ GdbOptionsPageWidget2::GdbOptionsPageWidget2() "calls and is very likely to destroy your debugging session.

")); } - auto checkBoxAttemptQuickStart = new QCheckBox(groupBoxDangerous); - checkBoxAttemptQuickStart->setText(GdbOptionsPage::tr("Attempt quick start")); - checkBoxAttemptQuickStart->setToolTip(GdbOptionsPage::tr( - "Postpones reading debug information as long as possible. " - "This can result in faster startup times at the price of not being able to " - "set breakpoints by file and number.")); - auto checkBoxMultiInferior = new QCheckBox(groupBoxDangerous); checkBoxMultiInferior->setText(GdbOptionsPage::tr("Debug all children")); checkBoxMultiInferior->setToolTip(GdbOptionsPage::tr( @@ -415,7 +408,6 @@ GdbOptionsPageWidget2::GdbOptionsPageWidget2() formLayout->addRow(checkBoxBreakOnAbort); if (checkBoxEnableReverseDebugging) formLayout->addRow(checkBoxEnableReverseDebugging); - formLayout->addRow(checkBoxAttemptQuickStart); formLayout->addRow(checkBoxMultiInferior); auto gridLayout = new QGridLayout(this); @@ -426,7 +418,6 @@ GdbOptionsPageWidget2::GdbOptionsPageWidget2() group.insert(action(BreakOnWarning), checkBoxBreakOnWarning); group.insert(action(BreakOnFatal), checkBoxBreakOnFatal); group.insert(action(BreakOnAbort), checkBoxBreakOnAbort); - group.insert(action(AttemptQuickStart), checkBoxAttemptQuickStart); group.insert(action(MultiInferior), checkBoxMultiInferior); if (checkBoxEnableReverseDebugging) group.insert(action(EnableReverseDebugging), checkBoxEnableReverseDebugging);