diff --git a/src/plugins/boot2qt/qdbplugin.cpp b/src/plugins/boot2qt/qdbplugin.cpp index a1157cca01a..77dca67bd32 100644 --- a/src/plugins/boot2qt/qdbplugin.cpp +++ b/src/plugins/boot2qt/qdbplugin.cpp @@ -121,10 +121,11 @@ public: : SimpleTargetRunner(runControl) { setStartModifier([this] { - CommandLine plain = commandLine(); - CommandLine cmd; - cmd.setExecutable(plain.executable().withNewPath(Constants::AppcontrollerFilepath)); - cmd.addCommandLineAsArgs(plain); + const CommandLine remoteCommand = commandLine(); + const FilePath remoteExe = remoteCommand.executable(); + CommandLine cmd{remoteExe.withNewPath(Constants::AppcontrollerFilepath)}; + cmd.addArg(remoteExe.nativePath()); + cmd.addArgs(remoteCommand.arguments(), CommandLine::Raw); setCommandLine(cmd); }); } diff --git a/src/plugins/boot2qt/qdbrunconfiguration.cpp b/src/plugins/boot2qt/qdbrunconfiguration.cpp index 7f203fd47e1..28097f7f5f0 100644 --- a/src/plugins/boot2qt/qdbrunconfiguration.cpp +++ b/src/plugins/boot2qt/qdbrunconfiguration.cpp @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include #include #include @@ -15,6 +17,7 @@ #include #include +#include using namespace ProjectExplorer; using namespace Utils; @@ -90,8 +93,9 @@ QdbRunConfiguration::QdbRunConfiguration(Target *target, Id id) const BuildTargetInfo bti = buildTargetInfo(); const FilePath localExecutable = bti.targetFilePath; const DeployableFile depFile = target->deploymentData().deployableForLocalFile(localExecutable); - - exeAspect->setExecutable(FilePath::fromString(depFile.remoteFilePath())); + IDevice::ConstPtr dev = DeviceKitAspect::device(target->kit()); + QTC_ASSERT(dev, return); + exeAspect->setExecutable(dev->filePath(depFile.remoteFilePath())); symbolsAspect->setFilePath(localExecutable); });