diff options
author | hjk <hjk@theqtcompany.com> | 2015-06-26 13:06:08 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-06-26 18:14:57 +0000 |
commit | 1538dca81aca4f82afef72340d91efc967face5b (patch) | |
tree | 63d8e0a47b1d4a6e6e9e35b16a3785066804d859 /src/plugins/remotelinux | |
parent | f84169b51ebd02ddaff8d207e647e3d51853f2ba (diff) | |
download | qt-creator-1538dca81aca4f82afef72340d91efc967face5b.tar.gz |
Debugger: Continue DebuggerStartParameter cleanup
- Move sysRoot, debuggerCommand, targetAbi to DebuggerRunParameters,
they are always the one coming from the kit.
- Move projectSource{Directory,Files} to DebuggerRunParameters,
they are alway coming from the runConfiguration's project
- Pass RunConfiguration always as separate parameter, that's
what related code does.
Change-Id: I9965a052237af53fa2d170701bc88b552cab12ed
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/plugins/remotelinux')
-rw-r--r-- | src/plugins/remotelinux/remotelinuxdebugsupport.cpp | 27 | ||||
-rw-r--r-- | src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp | 5 |
2 files changed, 6 insertions, 26 deletions
diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp index d785010dc5..769b0a2929 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp @@ -87,42 +87,25 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const AbstractR const IDevice::ConstPtr device = DeviceKitInformation::device(k); QTC_ASSERT(device, return params); + params.startMode = AttachToRemoteServer; params.closeMode = KillAndExitMonitorAtClose; - params.sysRoot = SysRootKitInformation::sysRoot(k).toString(); - params.debuggerCommand = DebuggerKitInformation::debuggerCommand(k).toString(); - if (ToolChain *tc = ToolChainKitInformation::toolChain(k)) - params.toolChainAbi = tc->targetAbi(); + params.remoteSetupNeeded = true; + params.displayName = runConfig->displayName(); - DebuggerRunConfigurationAspect *aspect - = runConfig->extraAspect<DebuggerRunConfigurationAspect>(); + auto aspect = runConfig->extraAspect<DebuggerRunConfigurationAspect>(); if (aspect->useQmlDebugger()) { - params.languages |= QmlLanguage; params.qmlServerAddress = device->sshParameters().host; params.qmlServerPort = 0; // port is selected later on } if (aspect->useCppDebugger()) { - params.multiProcess = true; - aspect->setUseMultiProcess(true); // TODO: One should suffice. - params.languages |= CppLanguage; + aspect->setUseMultiProcess(true); QStringList args = runConfig->arguments(); if (aspect->useQmlDebugger()) args.prepend(QString::fromLatin1("-qmljsdebugger=port:%qml_port%,block")); params.processArgs = Utils::QtcProcess::joinArgs(args, Utils::OsTypeLinux); - params.startMode = AttachToRemoteServer; params.executable = runConfig->localExecutableFilePath(); params.remoteChannel = device->sshParameters().host + QLatin1String(":-1"); params.remoteExecutable = runConfig->remoteExecutableFilePath(); - } else { - params.startMode = AttachToRemoteServer; - } - params.remoteSetupNeeded = true; - params.displayName = runConfig->displayName(); - - if (const Project *project = target->project()) { - params.projectSourceDirectory = project->projectDirectory().toString(); - if (const BuildConfiguration *buildConfig = target->activeBuildConfiguration()) - params.projectBuildDirectory = buildConfig->buildDirectory().toString(); - params.projectSourceFiles = project->files(Project::ExcludeGeneratedFiles); } return params; diff --git a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp index 69a94478dc..e933918b7d 100644 --- a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp +++ b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp @@ -104,10 +104,7 @@ RunControl *RemoteLinuxRunControlFactory::create(RunConfiguration *runConfig, Ru } DebuggerStartParameters params = LinuxDeviceDebugSupport::startParameters(rc); - if (mode == DebugRunModeWithBreakOnMain) - params.breakOnMain = true; - params.runConfiguration = runConfig; - DebuggerRunControl * const runControl = createDebuggerRunControl(params, errorMessage); + DebuggerRunControl * const runControl = createDebuggerRunControl(params, runConfig, errorMessage); if (!runControl) return 0; LinuxDeviceDebugSupport * const debugSupport = |