forked from qt-creator/qt-creator
Add support for "set sysroot" for remote debugging.
This commit is contained in:
@@ -454,6 +454,16 @@ bool StartRemoteDialog::useServerStartScript() const
|
|||||||
return m_ui->useServerStartScriptCheckBox->isChecked();
|
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()
|
void StartRemoteDialog::updateState()
|
||||||
{
|
{
|
||||||
bool enabled = m_ui->useServerStartScriptCheckBox->isChecked();
|
bool enabled = m_ui->useServerStartScriptCheckBox->isChecked();
|
||||||
|
@@ -140,6 +140,8 @@ public:
|
|||||||
QString serverStartScript() const;
|
QString serverStartScript() const;
|
||||||
void setUseServerStartScript(bool on);
|
void setUseServerStartScript(bool on);
|
||||||
bool useServerStartScript() const;
|
bool useServerStartScript() const;
|
||||||
|
void setSysroot(const QString &sysroot);
|
||||||
|
const QString sysroot() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateState();
|
void updateState();
|
||||||
|
@@ -112,6 +112,7 @@ public:
|
|||||||
QString remoteArchitecture;
|
QString remoteArchitecture;
|
||||||
QString symbolFileName;
|
QString symbolFileName;
|
||||||
QString serverStartScript;
|
QString serverStartScript;
|
||||||
|
QString sysRoot;
|
||||||
int toolChainType;
|
int toolChainType;
|
||||||
|
|
||||||
QString dumperLibrary;
|
QString dumperLibrary;
|
||||||
|
@@ -1292,17 +1292,20 @@ void DebuggerPlugin::startRemoteApplication()
|
|||||||
configValue(_("LastServerStartScript")).toString());
|
configValue(_("LastServerStartScript")).toString());
|
||||||
dlg.setUseServerStartScript(
|
dlg.setUseServerStartScript(
|
||||||
configValue(_("LastUseServerStartScript")).toBool());
|
configValue(_("LastUseServerStartScript")).toBool());
|
||||||
|
dlg.setSysroot(configValue(_("LastSysroot")).toString());
|
||||||
if (dlg.exec() != QDialog::Accepted)
|
if (dlg.exec() != QDialog::Accepted)
|
||||||
return;
|
return;
|
||||||
setConfigValue(_("LastRemoteChannel"), dlg.remoteChannel());
|
setConfigValue(_("LastRemoteChannel"), dlg.remoteChannel());
|
||||||
setConfigValue(_("LastRemoteArchitecture"), dlg.remoteArchitecture());
|
setConfigValue(_("LastRemoteArchitecture"), dlg.remoteArchitecture());
|
||||||
setConfigValue(_("LastServerStartScript"), dlg.serverStartScript());
|
setConfigValue(_("LastServerStartScript"), dlg.serverStartScript());
|
||||||
setConfigValue(_("LastUseServerStartScript"), dlg.useServerStartScript());
|
setConfigValue(_("LastUseServerStartScript"), dlg.useServerStartScript());
|
||||||
|
setConfigValue(_("LastSysroot"), dlg.sysroot());
|
||||||
sp->remoteChannel = dlg.remoteChannel();
|
sp->remoteChannel = dlg.remoteChannel();
|
||||||
sp->remoteArchitecture = dlg.remoteArchitecture();
|
sp->remoteArchitecture = dlg.remoteArchitecture();
|
||||||
sp->startMode = StartRemote;
|
sp->startMode = StartRemote;
|
||||||
if (dlg.useServerStartScript())
|
if (dlg.useServerStartScript())
|
||||||
sp->serverStartScript = dlg.serverStartScript();
|
sp->serverStartScript = dlg.serverStartScript();
|
||||||
|
sp->sysRoot = dlg.sysroot();
|
||||||
|
|
||||||
RunConfigurationPtr rc = activeRunConfiguration();
|
RunConfigurationPtr rc = activeRunConfiguration();
|
||||||
if (rc.isNull())
|
if (rc.isNull())
|
||||||
|
@@ -159,6 +159,7 @@ void RemoteGdbAdapter::startInferior()
|
|||||||
|
|
||||||
m_engine->postCommand(_("set architecture %1")
|
m_engine->postCommand(_("set architecture %1")
|
||||||
.arg(startParameters().remoteArchitecture));
|
.arg(startParameters().remoteArchitecture));
|
||||||
|
m_engine->postCommand(_("set sysroot %1").arg(startParameters().sysRoot));
|
||||||
|
|
||||||
if (!startParameters().processArgs.isEmpty())
|
if (!startParameters().processArgs.isEmpty())
|
||||||
m_engine->postCommand(_("-exec-arguments ")
|
m_engine->postCommand(_("-exec-arguments ")
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>310</width>
|
<width>439</width>
|
||||||
<height>224</height>
|
<height>224</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -49,26 +49,36 @@
|
|||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QComboBox" name="architectureComboBox"/>
|
<widget class="QComboBox" name="architectureComboBox"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QCheckBox" name="useServerStartScriptCheckBox"/>
|
<widget class="QCheckBox" name="useServerStartScriptCheckBox"/>
|
||||||
</item>
|
</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">
|
<widget class="QLabel" name="useServerStartScriptLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use server start script:</string>
|
<string>Use server start script:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="2" column="0">
|
||||||
<widget class="Utils::PathChooser" name="serverStartScript" native="true"/>
|
<widget class="QLabel" name="sysrootLabel">
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="serverStartScriptLabel">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Server start script:</string>
|
<string>Sysroot:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="Utils::PathChooser" name="sysrootPathChooser"/>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
Reference in New Issue
Block a user