diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index 204be5884551dc8a27c5510ab366ececc05853a2..380852c7b44b16af276d31453ba10f91cf364976 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 a70fe106b1512fd1b2b87330307b97b79f354f98..03c323259a502491c9257f55b458efc25cff650f 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 76869b379e275a944c82805afcb2b019a520b51a..0543f9c54f7be241e5255986d18c98eeae55bebb 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 acd19909d10c23db11d87a7f81efeeed9493a5f4..f9ae5cd24c1386c4c7397b6accc608e9f268122c 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 b1f8e7a70dfbea9f6d5da7a32f442f83b9f4232b..0a32bfc28b2cbb6c7aa4c2ff75cf8c4eb2c7db37 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 4bfc215190702820a2dd59ab9890975631887cda..5d596e17e7f9b07121e2c1acb7efef3d73dc178f 100644
--- a/src/plugins/debugger/startremotedialog.ui
+++ b/src/plugins/debugger/startremotedialog.ui
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>310</width>
+    <width>439</width>
     <height>224</height>
    </rect>
   </property>
@@ -49,26 +49,36 @@
      <item row="1" column="1">
       <widget class="QComboBox" name="architectureComboBox"/>
      </item>
-     <item row="2" column="1">
+     <item row="4" column="1">
       <widget class="QCheckBox" name="useServerStartScriptCheckBox"/>
      </item>
-     <item row="2" column="0">
+     <item row="5" column="1">
+      <widget class="Utils::PathChooser" name="serverStartScript"/>
+     </item>
+     <item row="5" column="0">
+      <widget class="QLabel" name="serverStartScriptLabel">
+       <property name="text">
+        <string>Server start script:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="0">
       <widget class="QLabel" name="useServerStartScriptLabel">
        <property name="text">
         <string>Use server start script:</string>
        </property>
       </widget>
      </item>
-     <item row="3" column="1">
-      <widget class="Utils::PathChooser" name="serverStartScript" native="true"/>
-     </item>
-     <item row="3" column="0">
-      <widget class="QLabel" name="serverStartScriptLabel">
+     <item row="2" column="0">
+      <widget class="QLabel" name="sysrootLabel">
        <property name="text">
-        <string>Server start script:</string>
+        <string>Sysroot:</string>
        </property>
       </widget>
      </item>
+     <item row="2" column="1">
+      <widget class="Utils::PathChooser" name="sysrootPathChooser"/>
+     </item>
     </layout>
    </item>
    <item>