summaryrefslogtreecommitdiff
path: root/src/plugins/remotelinux
diff options
context:
space:
mode:
authorhjk <qthjk@ovi.com>2012-06-28 10:00:04 +0200
committerhjk <qthjk@ovi.com>2012-06-28 15:30:15 +0200
commitded2dd12b84e67712e2bc5e0c8c0f392fa2479a6 (patch)
tree60ff401e9ba83ca852b2a77dce104c3fdf2be4ae /src/plugins/remotelinux
parentbb31b2572fe425b51464a707217d71efdd45d49c (diff)
downloadqt-creator-ded2dd12b84e67712e2bc5e0c8c0f392fa2479a6.tar.gz
debugger: adjust to profile changes
This replaces the debugger command, sysroot and target abi fields with a profile id. Change-Id: I831c42ff8624fcfa520c2f28f6f06d73191b2680 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'src/plugins/remotelinux')
-rw-r--r--src/plugins/remotelinux/remotelinuxdebugsupport.cpp22
-rw-r--r--src/plugins/remotelinux/startgdbserverdialog.cpp22
2 files changed, 24 insertions, 20 deletions
diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
index 86adfdf554..6184b94f22 100644
--- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
+++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
@@ -97,9 +97,17 @@ using namespace Internal;
DebuggerStartParameters AbstractRemoteLinuxDebugSupport::startParameters(const RemoteLinuxRunConfiguration *runConfig)
{
DebuggerStartParameters params;
+ Target *target = runConfig->target();
+ Profile *profile = target->profile();
const LinuxDeviceConfiguration::ConstPtr devConf
- = DeviceProfileInformation::device(runConfig->target()->profile())
+ = DeviceProfileInformation::device(profile)
.dynamicCast<const RemoteLinux::LinuxDeviceConfiguration>();
+
+ params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
+ params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
+ if (ToolChain *tc = ToolChainProfileInformation::toolChain(profile))
+ params.toolChainAbi = tc->targetAbi();
+
if (runConfig->debuggerAspect()->useQmlDebugger()) {
params.languages |= QmlLanguage;
params.qmlServerAddress = devConf->sshParameters().host;
@@ -108,18 +116,12 @@ DebuggerStartParameters AbstractRemoteLinuxDebugSupport::startParameters(const R
if (runConfig->debuggerAspect()->useCppDebugger()) {
params.languages |= CppLanguage;
params.processArgs = runConfig->arguments();
- QString systemRoot;
- if (SysRootProfileInformation::hasSysRoot(runConfig->target()->profile()))
- systemRoot = SysRootProfileInformation::sysRoot(runConfig->target()->profile()).toString();
- params.sysroot = systemRoot;
- params.toolChainAbi = runConfig->abi();
params.startMode = AttachToRemoteServer;
params.executable = runConfig->localExecutableFilePath();
- params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(runConfig->target()->profile()).toString();
params.remoteChannel = devConf->sshParameters().host + QLatin1String(":-1");
// TODO: This functionality should be inside the debugger.
- ToolChain *tc = ToolChainProfileInformation::toolChain(runConfig->target()->profile());
+ ToolChain *tc = ToolChainProfileInformation::toolChain(profile);
if (tc) {
const Abi &abi = tc->targetAbi();
params.remoteArchitecture = abi.toString();
@@ -132,9 +134,9 @@ DebuggerStartParameters AbstractRemoteLinuxDebugSupport::startParameters(const R
params.remoteSetupNeeded = true;
params.displayName = runConfig->displayName();
- if (const Project *project = runConfig->target()->project()) {
+ if (const Project *project = target->project()) {
params.projectSourceDirectory = project->projectDirectory();
- if (const BuildConfiguration *buildConfig = runConfig->target()->activeBuildConfiguration())
+ if (const BuildConfiguration *buildConfig = target->activeBuildConfiguration())
params.projectBuildDirectory = buildConfig->buildDirectory();
params.projectSourceFiles = project->files(Project::ExcludeGeneratedFiles);
}
diff --git a/src/plugins/remotelinux/startgdbserverdialog.cpp b/src/plugins/remotelinux/startgdbserverdialog.cpp
index a487a4b9c7..41b1a307ea 100644
--- a/src/plugins/remotelinux/startgdbserverdialog.cpp
+++ b/src/plugins/remotelinux/startgdbserverdialog.cpp
@@ -37,6 +37,7 @@
#include "remotelinuxusedportsgatherer.h"
#include <coreplugin/icore.h>
+#include <debugger/debuggertoolchaincombobox.h>
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/devicesupport/devicemanagermodel.h>
@@ -73,7 +74,7 @@ using namespace ProjectExplorer;
using namespace QSsh;
using namespace Utils;
-const char LastSysroot[] = "RemoteLinux/LastSysroot";
+const char LastProfile[] = "RemoteLinux/LastProfile";
const char LastDevice[] = "RemoteLinux/LastDevice";
const char LastProcessName[] = "RemoteLinux/LastProcessName";
//const char LastLocalExecutable[] = "RemoteLinux/LastLocalExecutable";
@@ -104,7 +105,7 @@ public:
QPushButton *attachProcessButton;
QTextBrowser *textBrowser;
QPushButton *closeButton;
- PathChooser *sysrootPathChooser;
+ Debugger::ProfileChooser *profileChooser;
RemoteLinuxUsedPortsGatherer gatherer;
SshRemoteProcessRunner runner;
@@ -120,10 +121,11 @@ StartGdbServerDialogPrivate::StartGdbServerDialogPrivate(StartGdbServerDialog *q
deviceComboBox = new QComboBox(q);
- sysrootPathChooser = new PathChooser(q);
- sysrootPathChooser->setExpectedKind(PathChooser::Directory);
- sysrootPathChooser->setPromptDialogTitle(StartGdbServerDialog::tr("Select Sysroot"));
- sysrootPathChooser->setPath(settings->value(LastSysroot).toString());
+ profileChooser = new Debugger::ProfileChooser(q);
+// sysrootPathChooser = new PathChooser(q);
+// sysrootPathChooser->setExpectedKind(PathChooser::Directory);
+// sysrootPathChooser->setPromptDialogTitle(StartGdbServerDialog::tr("Select Sysroot"));
+// sysrootPathChooser->setPath(settings->value(LastSysroot).toString());
//executablePathChooser = new PathChooser(q);
//executablePathChooser->setExpectedKind(PathChooser::File);
@@ -153,7 +155,7 @@ StartGdbServerDialogPrivate::StartGdbServerDialogPrivate(StartGdbServerDialog *q
QFormLayout *formLayout = new QFormLayout();
formLayout->addRow(StartGdbServerDialog::tr("Device:"), deviceComboBox);
- formLayout->addRow(StartGdbServerDialog::tr("Sysroot:"), sysrootPathChooser);
+ formLayout->addRow(StartGdbServerDialog::tr("Profile:"), profileChooser);
formLayout->addRow(StartGdbServerDialog::tr("&Filter entries:"), processFilterLineEdit);
QHBoxLayout *horizontalLayout2 = new QHBoxLayout();
@@ -197,7 +199,7 @@ StartGdbServerDialog::StartGdbServerDialog(QWidget *parent) :
connect(d->tableView->selectionModel(),
SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
SLOT(updateButtons()));
- connect(d->sysrootPathChooser, SIGNAL(changed(QString)),
+ connect(d->profileChooser, SIGNAL(activated(int)),
SLOT(updateButtons()));
//connect(d->updateListButton, SIGNAL(clicked()),
// SLOT(updateProcessList()));
@@ -281,7 +283,7 @@ void StartGdbServerDialog::attachToProcess()
return;
}
- d->settings->setValue(LastSysroot, d->sysrootPathChooser->path());
+ d->settings->setValue(LastProfile, d->profileChooser->currentProfileId().toString());
d->settings->setValue(LastDevice, d->deviceComboBox->currentIndex());
d->settings->setValue(LastProcessName, d->processFilterLineEdit->text());
@@ -380,7 +382,7 @@ void StartGdbServerDialog::reportOpenPort(int port)
if (ob) {
QMetaObject::invokeMethod(ob, member, Qt::QueuedConnection,
Q_ARG(QString, channel),
- Q_ARG(QString, d->sysrootPathChooser->path()),
+ Q_ARG(QString, d->profileChooser->currentProfileId().toString()),
Q_ARG(QString, d->remoteCommandLine),
Q_ARG(QString, d->remoteExecutable));
}