This is needed for multi-architecture gdb.
Reviewed-by: hjk
return m_ui->architectureComboBox->currentText();
}
+QString StartRemoteDialog::gnuTarget() const
+{
+ return m_ui->gnuTargetComboBox->currentText();
+}
+
+void StartRemoteDialog::setGnuTargets(const QStringList &gnuTargets)
+{
+ m_ui->gnuTargetComboBox->clear();
+ if (!gnuTargets.isEmpty()) {
+ m_ui->gnuTargetComboBox->insertItems(0, gnuTargets);
+ m_ui->gnuTargetComboBox->setCurrentIndex(0);
+ }
+}
+
+void StartRemoteDialog::setGnuTarget(const QString &gnuTarget)
+{
+ const int index = m_ui->gnuTargetComboBox->findText(gnuTarget);
+ if (index != -1)
+ m_ui->gnuTargetComboBox->setCurrentIndex(index);
+}
+
void StartRemoteDialog::setServerStartScript(const QString &scriptName)
{
m_ui->serverStartScript->setPath(scriptName);
void setRemoteArchitecture(const QString &arch);
void setRemoteArchitectures(const QStringList &arches);
+ QString gnuTarget() const;
+ void setGnuTarget(const QString &gnuTarget);
+ void setGnuTargets(const QStringList &gnuTargets);
+
bool useServerStartScript() const;
void setUseServerStartScript(bool on);
QString serverStartScript() const;
// for remote debugging
QString remoteChannel;
QString remoteArchitecture;
+ QString gnuTarget;
QString symbolFileName;
bool useServerStartScript;
QString serverStartScript;
QStringList arches;
arches.append(_("i386:x86-64:intel"));
arches.append(_("i386"));
+ arches.append(_("arm"));
QString lastUsed = configValue(_("LastRemoteArchitecture")).toString();
if (!arches.contains(lastUsed))
arches.prepend(lastUsed);
dlg.setRemoteArchitectures(arches);
+ QStringList gnuTargets;
+ gnuTargets.append(_("auto"));
+ gnuTargets.append(_("i686-linux-gnu"));
+ gnuTargets.append(_("x86_64-linux-gnu"));
+ gnuTargets.append(_("arm-none-linux-gnueabi"));
+ const QString lastUsedGnuTarget
+ = configValue(_("LastGnuTarget")).toString();
+ if (!gnuTargets.contains(lastUsedGnuTarget))
+ gnuTargets.prepend(lastUsedGnuTarget);
+ dlg.setGnuTargets(gnuTargets);
dlg.setRemoteChannel(
configValue(_("LastRemoteChannel")).toString());
dlg.setLocalExecutable(
configValue(_("LastLocalExecutable")).toString());
dlg.setDebugger(configValue(_("LastDebugger")).toString());
dlg.setRemoteArchitecture(lastUsed);
+ dlg.setGnuTarget(lastUsedGnuTarget);
dlg.setServerStartScript(
configValue(_("LastServerStartScript")).toString());
dlg.setUseServerStartScript(
setConfigValue(_("LastLocalExecutable"), dlg.localExecutable());
setConfigValue(_("LastDebugger"), dlg.debugger());
setConfigValue(_("LastRemoteArchitecture"), dlg.remoteArchitecture());
+ setConfigValue(_("LastGnuTarget"), dlg.gnuTarget());
setConfigValue(_("LastServerStartScript"), dlg.serverStartScript());
setConfigValue(_("LastUseServerStartScript"), dlg.useServerStartScript());
setConfigValue(_("LastSysroot"), dlg.sysRoot());
sp.remoteChannel = dlg.remoteChannel();
sp.remoteArchitecture = dlg.remoteArchitecture();
+ sp.gnuTarget = dlg.gnuTarget();
sp.executable = dlg.localExecutable();
sp.displayName = dlg.localExecutable();
sp.debuggerCommand = dlg.debugger(); // Override toolchain-detection.
}
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.join(_(" "));
if (!remoteArch.isEmpty())
m_engine->postCommand("set architecture " + remoteArch);
+ if (!gnuTarget.isEmpty())
+ m_engine->postCommand("set gnutarget " + gnuTarget);
if (!sysRoot.isEmpty())
m_engine->postCommand("set sysroot " + sysRoot);
if (!solibPath.isEmpty())
<rect>
<x>0</x>
<y>0</y>
- <width>439</width>
- <height>224</height>
+ <width>446</width>
+ <height>269</height>
</rect>
</property>
<property name="windowTitle">
<string>Start Debugger</string>
</property>
- <layout class="QVBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>9</number>
- </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::ExpandingFieldsGrow</enum>
- </property>
<item row="0" column="0">
<widget class="QLabel" name="debuggerLabel">
<property name="text">
</widget>
</item>
<item row="4" column="0">
+ <widget class="QLabel" name="gnuTargetLabel">
+ <property name="text">
+ <string>GNU target</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QComboBox" name="gnuTargetComboBox">
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
<widget class="QLabel" name="sysrootLabel">
<property name="text">
<string>Sysroot:</string>
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="5" column="1">
<widget class="Utils::PathChooser" name="sysrootPathChooser" native="true"/>
</item>
- <item row="5" column="0">
+ <item row="6" column="0">
<widget class="QLabel" name="useServerStartScriptLabel">
<property name="text">
<string>Use server start script:</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="6" column="1">
<widget class="QCheckBox" name="useServerStartScriptCheckBox"/>
</item>
- <item row="6" column="0">
+ <item row="7" column="0">
<widget class="QLabel" name="serverStartScriptLabel">
<property name="text">
<string>Server start script:</string>
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="7" column="1">
<widget class="Utils::PathChooser" name="serverStartScript" native="true"/>
</item>
</layout>
+ QString::number(gdbServerPort(runConfig));
params.useServerStartScript = true;
params.remoteArchitecture = QLatin1String("arm");
+ params.gnuTarget = QLatin1String("arm-none-linux-gnueabi");
}
} else {
params.startMode = AttachToRemote;