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);
|
item->setDefaultValue(false);
|
||||||
insertItem(AutoQuit, item);
|
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 = new SavedAction(this);
|
||||||
item->setSettingsKey(debugModeGroup, QLatin1String("MultiInferior"));
|
item->setSettingsKey(debugModeGroup, QLatin1String("MultiInferior"));
|
||||||
item->setCheckable(true);
|
item->setCheckable(true);
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ enum DebuggerActionCode
|
|||||||
// Gdb
|
// Gdb
|
||||||
LoadGdbInit,
|
LoadGdbInit,
|
||||||
LoadGdbDumpers,
|
LoadGdbDumpers,
|
||||||
AttemptQuickStart,
|
|
||||||
GdbStartupCommands,
|
GdbStartupCommands,
|
||||||
GdbPostAttachCommands,
|
GdbPostAttachCommands,
|
||||||
GdbWatchdogTimeout,
|
GdbWatchdogTimeout,
|
||||||
|
|||||||
@@ -217,7 +217,6 @@ GdbEngine::GdbEngine(const DebuggerRunParameters &startParameters)
|
|||||||
m_commandsDoneCallback = 0;
|
m_commandsDoneCallback = 0;
|
||||||
m_stackNeeded = false;
|
m_stackNeeded = false;
|
||||||
m_terminalTrap = startParameters.useTerminal;
|
m_terminalTrap = startParameters.useTerminal;
|
||||||
m_fullStartDone = false;
|
|
||||||
m_systemDumpersLoaded = false;
|
m_systemDumpersLoaded = false;
|
||||||
m_rerunPending = false;
|
m_rerunPending = false;
|
||||||
m_inUpdateLocals = false;
|
m_inUpdateLocals = false;
|
||||||
@@ -1382,14 +1381,6 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
|
|||||||
return;
|
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());
|
BreakpointResponseId rid(data["bkptno"].data());
|
||||||
int lineNumber = 0;
|
int lineNumber = 0;
|
||||||
QString fullName;
|
QString fullName;
|
||||||
@@ -1468,8 +1459,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
|
|||||||
|
|
||||||
CHECK_STATE(InferiorStopOk);
|
CHECK_STATE(InferiorStopOk);
|
||||||
|
|
||||||
if (gotoHandleStop1)
|
handleStop1(data);
|
||||||
handleStop1(data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString stopSignal(const Abi &abi)
|
static QString stopSignal(const Abi &abi)
|
||||||
@@ -4024,12 +4014,6 @@ void GdbEngine::startGdb(const QStringList &args)
|
|||||||
//QByteArray ba = QFileInfo(sp.dumperLibrary).path().toLocal8Bit();
|
//QByteArray ba = QFileInfo(sp.dumperLibrary).path().toLocal8Bit();
|
||||||
//if (!ba.isEmpty())
|
//if (!ba.isEmpty())
|
||||||
// runCommand("set solib-search-path " + ba);
|
// 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) {
|
if (boolSetting(MultiInferior) || runParameters().multiProcess) {
|
||||||
//runCommand("set follow-exec-mode new");
|
//runCommand("set follow-exec-mode new");
|
||||||
@@ -4362,22 +4346,6 @@ void GdbEngine::requestDebugInformation(const DebugInfoTask &task)
|
|||||||
QProcess::startDetached(task.command);
|
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)
|
void GdbEngine::write(const QByteArray &data)
|
||||||
{
|
{
|
||||||
m_gdbProc.write(data);
|
m_gdbProc.write(data);
|
||||||
|
|||||||
@@ -407,10 +407,6 @@ protected:
|
|||||||
void requestDebugInformation(const DebugInfoTask &task);
|
void requestDebugInformation(const DebugInfoTask &task);
|
||||||
DebugInfoTaskHandler *m_debugInfoTaskHandler;
|
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;
|
bool m_systemDumpersLoaded;
|
||||||
|
|
||||||
static QString msgGdbStopFailed(const QString &why);
|
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>"));
|
"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);
|
auto checkBoxMultiInferior = new QCheckBox(groupBoxDangerous);
|
||||||
checkBoxMultiInferior->setText(GdbOptionsPage::tr("Debug all children"));
|
checkBoxMultiInferior->setText(GdbOptionsPage::tr("Debug all children"));
|
||||||
checkBoxMultiInferior->setToolTip(GdbOptionsPage::tr(
|
checkBoxMultiInferior->setToolTip(GdbOptionsPage::tr(
|
||||||
@@ -415,7 +408,6 @@ GdbOptionsPageWidget2::GdbOptionsPageWidget2()
|
|||||||
formLayout->addRow(checkBoxBreakOnAbort);
|
formLayout->addRow(checkBoxBreakOnAbort);
|
||||||
if (checkBoxEnableReverseDebugging)
|
if (checkBoxEnableReverseDebugging)
|
||||||
formLayout->addRow(checkBoxEnableReverseDebugging);
|
formLayout->addRow(checkBoxEnableReverseDebugging);
|
||||||
formLayout->addRow(checkBoxAttemptQuickStart);
|
|
||||||
formLayout->addRow(checkBoxMultiInferior);
|
formLayout->addRow(checkBoxMultiInferior);
|
||||||
|
|
||||||
auto gridLayout = new QGridLayout(this);
|
auto gridLayout = new QGridLayout(this);
|
||||||
@@ -426,7 +418,6 @@ GdbOptionsPageWidget2::GdbOptionsPageWidget2()
|
|||||||
group.insert(action(BreakOnWarning), checkBoxBreakOnWarning);
|
group.insert(action(BreakOnWarning), checkBoxBreakOnWarning);
|
||||||
group.insert(action(BreakOnFatal), checkBoxBreakOnFatal);
|
group.insert(action(BreakOnFatal), checkBoxBreakOnFatal);
|
||||||
group.insert(action(BreakOnAbort), checkBoxBreakOnAbort);
|
group.insert(action(BreakOnAbort), checkBoxBreakOnAbort);
|
||||||
group.insert(action(AttemptQuickStart), checkBoxAttemptQuickStart);
|
|
||||||
group.insert(action(MultiInferior), checkBoxMultiInferior);
|
group.insert(action(MultiInferior), checkBoxMultiInferior);
|
||||||
if (checkBoxEnableReverseDebugging)
|
if (checkBoxEnableReverseDebugging)
|
||||||
group.insert(action(EnableReverseDebugging), checkBoxEnableReverseDebugging);
|
group.insert(action(EnableReverseDebugging), checkBoxEnableReverseDebugging);
|
||||||
|
|||||||
Reference in New Issue
Block a user