forked from qt-creator/qt-creator
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 <christian.stenger@qt.io>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -122,7 +122,6 @@ enum DebuggerActionCode
|
||||
// Gdb
|
||||
LoadGdbInit,
|
||||
LoadGdbDumpers,
|
||||
AttemptQuickStart,
|
||||
GdbStartupCommands,
|
||||
GdbPostAttachCommands,
|
||||
GdbWatchdogTimeout,
|
||||
|
||||
@@ -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,7 +1459,6 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
|
||||
|
||||
CHECK_STATE(InferiorStopOk);
|
||||
|
||||
if (gotoHandleStop1)
|
||||
handleStop1(data);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -392,13 +392,6 @@ GdbOptionsPageWidget2::GdbOptionsPageWidget2()
|
||||
"calls and is very likely to destroy your debugging session.</p></body></html>"));
|
||||
}
|
||||
|
||||
auto checkBoxAttemptQuickStart = new QCheckBox(groupBoxDangerous);
|
||||
checkBoxAttemptQuickStart->setText(GdbOptionsPage::tr("Attempt quick start"));
|
||||
checkBoxAttemptQuickStart->setToolTip(GdbOptionsPage::tr(
|
||||
"<html><head/><body>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.</body></html>"));
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user