Debugger: Somewhat more direct server command construction

No need to set args just to delete them again.

Change-Id: Ib97d327329a25cb907227feb22db2334908ef089
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2023-06-23 13:20:27 +02:00
parent ffa52040a4
commit 26ef870761

View File

@@ -1034,14 +1034,12 @@ DebugServerRunner::DebugServerRunner(RunControl *runControl, DebugServerPortsGat
CommandLine cmd; CommandLine cmd;
if (isQmlDebugging) { if (isQmlDebugging && !isCppDebugging) {
// FIXME: Case should not happen?
cmd.setExecutable(commandLine().executable());
cmd.addArg(QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlDebuggerServices, cmd.addArg(QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlDebuggerServices,
portsGatherer->qmlServer())); portsGatherer->qmlServer()));
} cmd.addArgs(commandLine().arguments(), CommandLine::Raw);
cmd.addArgs(commandLine().arguments(), CommandLine::Raw);
if (isQmlDebugging && !isCppDebugging) {
cmd.setExecutable(commandLine().executable()); // FIXME: Case should not happen?
} else { } else {
cmd.setExecutable(runControl->device()->debugServerPath()); cmd.setExecutable(runControl->device()->debugServerPath());
@@ -1065,7 +1063,6 @@ DebugServerRunner::DebugServerRunner(RunControl *runControl, DebugServerPortsGat
cmd.setExecutable(runControl->device()->filePath("gdbserver")); cmd.setExecutable(runControl->device()->filePath("gdbserver"));
} }
} }
cmd.setArguments({});
if (cmd.executable().baseName().contains("lldb-server")) { if (cmd.executable().baseName().contains("lldb-server")) {
cmd.addArg("platform"); cmd.addArg("platform");
cmd.addArg("--listen"); cmd.addArg("--listen");