diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index 204be588455..380852c7b44 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -454,6 +454,16 @@ bool StartRemoteDialog::useServerStartScript() const
return m_ui->useServerStartScriptCheckBox->isChecked();
}
+void StartRemoteDialog::setSysroot(const QString &sysroot)
+{
+ m_ui->sysrootPathChooser->setPath(sysroot);
+}
+
+const QString StartRemoteDialog::sysroot() const
+{
+ return m_ui->sysrootPathChooser->path();
+}
+
void StartRemoteDialog::updateState()
{
bool enabled = m_ui->useServerStartScriptCheckBox->isChecked();
diff --git a/src/plugins/debugger/debuggerdialogs.h b/src/plugins/debugger/debuggerdialogs.h
index a70fe106b15..03c323259a5 100644
--- a/src/plugins/debugger/debuggerdialogs.h
+++ b/src/plugins/debugger/debuggerdialogs.h
@@ -140,6 +140,8 @@ public:
QString serverStartScript() const;
void setUseServerStartScript(bool on);
bool useServerStartScript() const;
+ void setSysroot(const QString &sysroot);
+ const QString sysroot() const;
private slots:
void updateState();
diff --git a/src/plugins/debugger/debuggermanager.h b/src/plugins/debugger/debuggermanager.h
index 76869b379e2..0543f9c54f7 100644
--- a/src/plugins/debugger/debuggermanager.h
+++ b/src/plugins/debugger/debuggermanager.h
@@ -112,6 +112,7 @@ public:
QString remoteArchitecture;
QString symbolFileName;
QString serverStartScript;
+ QString sysRoot;
int toolChainType;
QString dumperLibrary;
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index acd19909d10..f9ae5cd24c1 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1292,17 +1292,20 @@ void DebuggerPlugin::startRemoteApplication()
configValue(_("LastServerStartScript")).toString());
dlg.setUseServerStartScript(
configValue(_("LastUseServerStartScript")).toBool());
+ dlg.setSysroot(configValue(_("LastSysroot")).toString());
if (dlg.exec() != QDialog::Accepted)
return;
setConfigValue(_("LastRemoteChannel"), dlg.remoteChannel());
setConfigValue(_("LastRemoteArchitecture"), dlg.remoteArchitecture());
setConfigValue(_("LastServerStartScript"), dlg.serverStartScript());
setConfigValue(_("LastUseServerStartScript"), dlg.useServerStartScript());
+ setConfigValue(_("LastSysroot"), dlg.sysroot());
sp->remoteChannel = dlg.remoteChannel();
sp->remoteArchitecture = dlg.remoteArchitecture();
sp->startMode = StartRemote;
if (dlg.useServerStartScript())
sp->serverStartScript = dlg.serverStartScript();
+ sp->sysRoot = dlg.sysroot();
RunConfigurationPtr rc = activeRunConfiguration();
if (rc.isNull())
diff --git a/src/plugins/debugger/gdb/remotegdbadapter.cpp b/src/plugins/debugger/gdb/remotegdbadapter.cpp
index b1f8e7a70df..0a32bfc28b2 100644
--- a/src/plugins/debugger/gdb/remotegdbadapter.cpp
+++ b/src/plugins/debugger/gdb/remotegdbadapter.cpp
@@ -159,6 +159,7 @@ void RemoteGdbAdapter::startInferior()
m_engine->postCommand(_("set architecture %1")
.arg(startParameters().remoteArchitecture));
+ m_engine->postCommand(_("set sysroot %1").arg(startParameters().sysRoot));
if (!startParameters().processArgs.isEmpty())
m_engine->postCommand(_("-exec-arguments ")
diff --git a/src/plugins/debugger/startremotedialog.ui b/src/plugins/debugger/startremotedialog.ui
index 4bfc2151907..5d596e17e7f 100644
--- a/src/plugins/debugger/startremotedialog.ui
+++ b/src/plugins/debugger/startremotedialog.ui
@@ -6,7 +6,7 @@
0
0
- 310
+ 439
224
@@ -49,26 +49,36 @@
-
- -
+
-
- -
+
-
+
+
+ -
+
+
+ Server start script:
+
+
+
+ -
Use server start script:
- -
-
-
- -
-
+
-
+
- Server start script:
+ Sysroot:
+ -
+
+
-