diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index e79a4a27c31..bb903e30ced 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -385,8 +385,10 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent) { m_ui->setupUi(this); m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); + m_ui->executablePathChooser->setExpectedKind(Utils::PathChooser::File); + m_ui->executablePathChooser->setPromptDialogTitle(tr("Select Executable")); m_ui->serverStartScript->setExpectedKind(Utils::PathChooser::File); - m_ui->serverStartScript->setPromptDialogTitle(tr("Select Executable")); + m_ui->serverStartScript->setPromptDialogTitle(tr("Select Start Script")); connect(m_ui->useServerStartScriptCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateState())); @@ -412,6 +414,16 @@ QString StartRemoteDialog::remoteChannel() const return m_ui->channelLineEdit->text(); } +void StartRemoteDialog::setLocalExecutable(const QString &executable) +{ + m_ui->executablePathChooser->setPath(executable); +} + +QString StartRemoteDialog::localExecutable() const +{ + return m_ui->executablePathChooser->path(); +} + void StartRemoteDialog::setRemoteArchitectures(const QStringList &list) { m_ui->architectureComboBox->clear(); @@ -453,12 +465,12 @@ bool StartRemoteDialog::useServerStartScript() const return m_ui->useServerStartScriptCheckBox->isChecked(); } -void StartRemoteDialog::setSysroot(const QString &sysroot) +void StartRemoteDialog::setSysRoot(const QString &sysroot) { m_ui->sysrootPathChooser->setPath(sysroot); } -const QString StartRemoteDialog::sysroot() const +QString StartRemoteDialog::sysRoot() const { return m_ui->sysrootPathChooser->path(); } diff --git a/src/plugins/debugger/debuggerdialogs.h b/src/plugins/debugger/debuggerdialogs.h index 03c323259a5..87d59d11bbc 100644 --- a/src/plugins/debugger/debuggerdialogs.h +++ b/src/plugins/debugger/debuggerdialogs.h @@ -134,14 +134,16 @@ public: void setRemoteChannel(const QString &host); void setRemoteArchitecture(const QString &arch); void setRemoteArchitectures(const QStringList &arches); + void setLocalExecutable(const QString &executable); + QString localExecutable() const; QString remoteChannel() const; QString remoteArchitecture() const; void setServerStartScript(const QString &scriptName); QString serverStartScript() const; void setUseServerStartScript(bool on); bool useServerStartScript() const; - void setSysroot(const QString &sysroot); - const QString sysroot() const; + void setSysRoot(const QString &sysRoot); + QString sysRoot() const; private slots: void updateState(); diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index e823fb85258..b46d9b7cdd4 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1340,7 +1340,8 @@ void DebuggerPlugin::attachCore(const QString &core, const QString &exe) sp->coreFile = core; sp->startMode = AttachCore; if (RunControl *runControl = m_debuggerRunControlFactory->create(sp)) - ProjectExplorerPlugin::instance()->startRunControl(runControl, ProjectExplorer::Constants::DEBUGMODE); + ProjectExplorerPlugin::instance()-> + startRunControl(runControl, ProjectExplorer::Constants::DEBUGMODE); } void DebuggerPlugin::startRemoteApplication() @@ -1356,28 +1357,33 @@ void DebuggerPlugin::startRemoteApplication() dlg.setRemoteArchitectures(arches); dlg.setRemoteChannel( configValue(_("LastRemoteChannel")).toString()); + dlg.setLocalExecutable( + configValue(_("LastLocalExecutable")).toString()); dlg.setRemoteArchitecture(lastUsed); dlg.setServerStartScript( configValue(_("LastServerStartScript")).toString()); dlg.setUseServerStartScript( configValue(_("LastUseServerStartScript")).toBool()); - dlg.setSysroot(configValue(_("LastSysroot")).toString()); + dlg.setSysRoot(configValue(_("LastSysroot")).toString()); if (dlg.exec() != QDialog::Accepted) return; setConfigValue(_("LastRemoteChannel"), dlg.remoteChannel()); + setConfigValue(_("LastLocalExecutable"), dlg.localExecutable()); setConfigValue(_("LastRemoteArchitecture"), dlg.remoteArchitecture()); setConfigValue(_("LastServerStartScript"), dlg.serverStartScript()); setConfigValue(_("LastUseServerStartScript"), dlg.useServerStartScript()); - setConfigValue(_("LastSysroot"), dlg.sysroot()); + setConfigValue(_("LastSysroot"), dlg.sysRoot()); sp->remoteChannel = dlg.remoteChannel(); sp->remoteArchitecture = dlg.remoteArchitecture(); + sp->executable = dlg.localExecutable(); sp->startMode = StartRemote; if (dlg.useServerStartScript()) sp->serverStartScript = dlg.serverStartScript(); - sp->sysRoot = dlg.sysroot(); + sp->sysRoot = dlg.sysRoot(); if (RunControl *runControl = m_debuggerRunControlFactory->create(sp)) - ProjectExplorerPlugin::instance()->startRunControl(runControl, ProjectExplorer::Constants::DEBUGMODE); + ProjectExplorerPlugin::instance() + ->startRunControl(runControl, ProjectExplorer::Constants::DEBUGMODE); } #include "debuggerplugin.moc" diff --git a/src/plugins/debugger/gdb/remotegdbadapter.cpp b/src/plugins/debugger/gdb/remotegdbadapter.cpp index a18aba05b4d..79b1fd5a5d5 100644 --- a/src/plugins/debugger/gdb/remotegdbadapter.cpp +++ b/src/plugins/debugger/gdb/remotegdbadapter.cpp @@ -166,7 +166,7 @@ void RemoteGdbAdapter::startInferior() + startParameters().processArgs.join(_(" "))); m_engine->postCommand(_("set target-async on"), CB(handleSetTargetAsync)); - + QString x = startParameters().executable; QFileInfo fi(startParameters().executable); QString fileName = fi.absoluteFilePath(); m_engine->postCommand(_("-file-exec-and-symbols \"%1\"").arg(fileName), diff --git a/src/plugins/debugger/startremotedialog.ui b/src/plugins/debugger/startremotedialog.ui index c72289f21b0..f6ac099ea58 100644 --- a/src/plugins/debugger/startremotedialog.ui +++ b/src/plugins/debugger/startremotedialog.ui @@ -25,28 +25,31 @@ QFormLayout::ExpandingFieldsGrow - + Host and port: - + localhost:5115 - + + + + Architecture: - + true @@ -73,16 +76,23 @@ - + Sysroot: - + + + + + Local executable: + + +