diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index b1babc5ab25..e13502c351f 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -665,6 +665,8 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent, bool enableStartScript)
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
m_ui->debuggerPathChooser->setExpectedKind(PathChooser::File);
m_ui->debuggerPathChooser->setPromptDialogTitle(tr("Select Debugger"));
+ m_ui->debuginfoPathChooser->setExpectedKind(PathChooser::File);
+ m_ui->debuginfoPathChooser->setPromptDialogTitle(tr("Select Location of Debugging Information"));
m_ui->executablePathChooser->setExpectedKind(PathChooser::File);
m_ui->executablePathChooser->setPromptDialogTitle(tr("Select Executable"));
m_ui->sysrootPathChooser->setPromptDialogTitle(tr("Select Sysroot"));
@@ -720,6 +722,16 @@ QString StartRemoteDialog::debugger() const
return m_ui->debuggerPathChooser->path();
}
+void StartRemoteDialog::setDebugInfoLocation(const QString &location)
+{
+ m_ui->debuginfoPathChooser->setPath(location);
+}
+
+QString StartRemoteDialog::debugInfoLocation() const
+{
+ return m_ui->debuginfoPathChooser->path();
+}
+
void StartRemoteDialog::setRemoteArchitectures(const QStringList &list)
{
m_ui->architectureComboBox->clear();
diff --git a/src/plugins/debugger/debuggerdialogs.h b/src/plugins/debugger/debuggerdialogs.h
index 8dd98ec60fe..1f1bf735a28 100644
--- a/src/plugins/debugger/debuggerdialogs.h
+++ b/src/plugins/debugger/debuggerdialogs.h
@@ -210,6 +210,9 @@ public:
QString debugger() const;
void setDebugger(const QString &debugger);
+ void setDebugInfoLocation(const QString &location);
+ QString debugInfoLocation() const;
+
private slots:
void updateState();
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 2c06727dd9d..6d27e1f03e1 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1585,6 +1585,7 @@ bool DebuggerPluginPrivate::queryRemoteParameters(DebuggerStartParameters &sp, b
dlg.setUseServerStartScript(
configValue(_("LastUseServerStartScript")).toBool());
dlg.setSysroot(configValue(_("LastSysroot")).toString());
+ dlg.setDebugInfoLocation(configValue(_("LastDebugInfoLocation")).toString());
if (dlg.exec() != QDialog::Accepted)
return false;
setConfigValue(_("LastRemoteChannel"), dlg.remoteChannel());
@@ -1596,6 +1597,7 @@ bool DebuggerPluginPrivate::queryRemoteParameters(DebuggerStartParameters &sp, b
setConfigValue(_("LastServerStartScript"), dlg.serverStartScript());
setConfigValue(_("LastUseServerStartScript"), dlg.useServerStartScript());
setConfigValue(_("LastSysroot"), dlg.sysroot());
+ setConfigValue(_("LastDebugInfoLocation"), dlg.debugInfoLocation());
sp.remoteChannel = dlg.remoteChannel();
sp.remoteArchitecture = dlg.remoteArchitecture();
sp.gnuTarget = dlg.gnuTarget();
@@ -1609,6 +1611,9 @@ bool DebuggerPluginPrivate::queryRemoteParameters(DebuggerStartParameters &sp, b
sp.useServerStartScript = dlg.useServerStartScript();
sp.serverStartScript = dlg.serverStartScript();
sp.sysroot = dlg.sysroot();
+ sp.debugInfoLocation = dlg.debugInfoLocation();
+ if (sp.debugInfoLocation.isEmpty())
+ sp.debugInfoLocation = sp.sysroot + "/usr/lib/debug";
return true;
}
diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h
index 2ee3f76757f..79d7485e3b0 100644
--- a/src/plugins/debugger/debuggerstartparameters.h
+++ b/src/plugins/debugger/debuggerstartparameters.h
@@ -108,6 +108,7 @@ public:
bool useServerStartScript;
QString serverStartScript;
QString sysroot;
+ QString debugInfoLocation;
QByteArray remoteDumperLib;
QByteArray remoteSourcesDir;
QString remoteMountPoint;
diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
index 525aec35018..b1cf4d01cf1 100644
--- a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
+++ b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
@@ -161,18 +161,19 @@ void RemoteGdbServerAdapter::uploadProcFinished()
void RemoteGdbServerAdapter::setupInferior()
{
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
+ const DebuggerStartParameters &sp = startParameters();
QString fileName;
- if (!startParameters().executable.isEmpty()) {
- QFileInfo fi(startParameters().executable);
+ if (!sp.executable.isEmpty()) {
+ QFileInfo fi(sp.executable);
fileName = fi.absoluteFilePath();
}
- const QByteArray sysroot = startParameters().sysroot.toLocal8Bit();
- const QByteArray remoteArch = startParameters().remoteArchitecture.toLatin1();
- const QByteArray gnuTarget = startParameters().gnuTarget.toLatin1();
- const QByteArray solibPath =
- QFileInfo(startParameters().dumperLibrary).path().toLocal8Bit();
- const QString args = startParameters().processArgs;
+ const QByteArray sysroot = sp.sysroot.toLocal8Bit();
+ const QByteArray debugInfoLocation = sp.debugInfoLocation.toLocal8Bit();
+ const QByteArray remoteArch = sp.remoteArchitecture.toLatin1();
+ const QByteArray gnuTarget = sp.gnuTarget.toLatin1();
+ const QByteArray solibPath = QFileInfo(sp.dumperLibrary).path().toLocal8Bit();
+ const QString args = sp.processArgs;
if (!remoteArch.isEmpty())
m_engine->postCommand("set architecture " + remoteArch);
@@ -180,6 +181,8 @@ void RemoteGdbServerAdapter::setupInferior()
m_engine->postCommand("set gnutarget " + gnuTarget);
if (!sysroot.isEmpty())
m_engine->postCommand("set sysroot " + sysroot);
+ if (!sysroot.isEmpty())
+ m_engine->postCommand("set debug-file-directory " + debugInfoLocation);
if (!solibPath.isEmpty())
m_engine->postCommand("set solib-search-path " + solibPath);
if (!args.isEmpty())
diff --git a/src/plugins/debugger/startremotedialog.ui b/src/plugins/debugger/startremotedialog.ui
index e74cbaf7429..1dabe7c23de 100644
--- a/src/plugins/debugger/startremotedialog.ui
+++ b/src/plugins/debugger/startremotedialog.ui
@@ -107,6 +107,19 @@
-
+
+
+ Location of debugging information:
+
+
+ debuginfoPathChooser
+
+
+
+ -
+
+
+ -
Override host GDB s&tart script:
@@ -116,10 +129,10 @@
- -
+
-
- -
+
-
&Use server start script:
@@ -129,10 +142,10 @@
- -
+
-
- -
+
-
&Server start script:
@@ -142,7 +155,7 @@
- -
+
-