Commit 6bb00241 authored by hjk's avatar hjk

Debugger: Make adding tasks for missing debug info packages optional

Task-number: QTCREATORBUG-8949
Change-Id: If0cf1c1078a72a3e4a3d371d236bacac858b8046
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent a5b3f27e
......@@ -450,6 +450,12 @@ DebuggerSettings::DebuggerSettings(QSettings *settings)
item->setDefaultValue(false);
insertItem(IntelFlavor, item);
item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("IdentifyDebugInfoPackages"));
item->setCheckable(true);
item->setDefaultValue(false);
insertItem(IdentifyDebugInfoPackages, item);
item = new SavedAction(this);
item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTips"));
item->setText(tr("Use tooltips in main editor when debugging"));
......
......@@ -128,6 +128,7 @@ enum DebuggerActionCode
WarnOnReleaseBuilds,
MultiInferior,
IntelFlavor,
IdentifyDebugInfoPackages,
// Stack
MaximalStackDepth,
......
......@@ -718,23 +718,25 @@ void GdbEngine::handleResponse(const QByteArray &buff)
break;
}
// From SuSE's gdb: >&"Missing separate debuginfo for ...\n"
// ">&"Try: zypper install -C \"debuginfo(build-id)=c084ee5876ed1ac12730181c9f07c3e027d8e943\"\n"
if (data.startsWith("Missing separate debuginfo for ")) {
m_lastMissingDebugInfo = QString::fromLocal8Bit(data.mid(32));
} else if (data.startsWith("Try: zypper")) {
QString cmd = QString::fromLocal8Bit(data.mid(4));
Task task(Task::Warning,
tr("Missing debug information for %1\nTry: %2")
.arg(m_lastMissingDebugInfo).arg(cmd),
FileName(), 0, Core::Id(Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO));
taskHub()->addTask(task);
DebugInfoTask dit;
dit.command = cmd;
m_debugInfoTaskHandler->addTask(task.taskId, dit);
if (debuggerCore()->boolSetting(IdentifyDebugInfoPackages)) {
// From SuSE's gdb: >&"Missing separate debuginfo for ...\n"
// ">&"Try: zypper install -C \"debuginfo(build-id)=c084ee5876ed1ac12730181c9f07c3e027d8e943\"\n"
if (data.startsWith("Missing separate debuginfo for ")) {
m_lastMissingDebugInfo = QString::fromLocal8Bit(data.mid(32));
} else if (data.startsWith("Try: zypper")) {
QString cmd = QString::fromLocal8Bit(data.mid(4));
Task task(Task::Warning,
tr("Missing debug information for %1\nTry: %2")
.arg(m_lastMissingDebugInfo).arg(cmd),
FileName(), 0, Core::Id(Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO));
taskHub()->addTask(task);
DebugInfoTask dit;
dit.command = cmd;
m_debugInfoTaskHandler->addTask(task.taskId, dit);
}
}
break;
......
......@@ -66,6 +66,7 @@ public:
QCheckBox *checkBoxLoadGdbInit;
QCheckBox *checkBoxLoadGdbDumpers;
QCheckBox *checkBoxIntelFlavor;
QCheckBox *checkBoxIdentifyDebugInfoPackages;
QGroupBox *groupBoxStartupCommands;
QTextEdit *textEditStartupCommands;
......@@ -159,6 +160,14 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent)
"<html><head/><body>GDB shows by default AT&&T style disassembly."
"</body></html>"));
checkBoxIdentifyDebugInfoPackages = new QCheckBox(groupBoxGeneral);
checkBoxIdentifyDebugInfoPackages->setText(GdbOptionsPage::tr("Create tasks from missing packages"));
checkBoxIdentifyDebugInfoPackages->setToolTip(GdbOptionsPage::tr(
"<html><head/><body><p>Checking this option attempts to identify missing debug "
"info packages and lists them in the Issues output pane.</p><p>"
"<b>Note:</b>This feature needs special support from the Linux "
"distribution and GDB build and is not everywhere available.</p></body></html>"));
groupBoxStartupCommands = new QGroupBox(this);
groupBoxStartupCommands->setTitle(GdbOptionsPage::tr("Additional Startup Commands"));
groupBoxStartupCommands->setToolTip(GdbOptionsPage::tr(
......@@ -226,6 +235,7 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent)
formLayout->addRow(checkBoxLoadGdbInit);
formLayout->addRow(checkBoxLoadGdbDumpers);
formLayout->addRow(checkBoxIntelFlavor);
formLayout->addRow(checkBoxIdentifyDebugInfoPackages);
QGridLayout *startLayout = new QGridLayout(groupBoxStartupCommands);
startLayout->addWidget(textEditStartupCommands, 0, 0, 1, 1);
......@@ -260,6 +270,7 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent)
group.insert(dc->action(AdjustBreakpointLocations), checkBoxAdjustBreakpointLocations);
group.insert(dc->action(GdbWatchdogTimeout), spinBoxGdbWatchdogTimeout);
group.insert(dc->action(IntelFlavor), checkBoxIntelFlavor);
group.insert(dc->action(IdentifyDebugInfoPackages), checkBoxIdentifyDebugInfoPackages);
group.insert(dc->action(UseMessageBoxForSignals), checkBoxUseMessageBoxForSignals);
group.insert(dc->action(SkipKnownFrames), checkBoxSkipKnownFrames);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment