Debugger: Start lldb-server instead of gdbserver

... when the debug server looks like lldb-sever.
Also use suitable arguments.

Needed for setting up device connection later.

Change-Id: Ie4130be7881e12d460ab5116b0018916d47ed012
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-04-02 12:09:45 +02:00
parent aec5563364
commit fb784a1f80

View File

@@ -1103,13 +1103,21 @@ DebugServerRunner::DebugServerRunner(RunControl *runControl, DebugServerPortsGat
if (debugServer.executable.isEmpty())
debugServer.executable = FilePath::fromString("gdbserver");
args.clear();
if (m_useMulti)
args.append("--multi");
if (m_pid.isValid())
args.append("--attach");
args.append(QString(":%1").arg(portsGatherer->gdbServer().port()));
if (m_pid.isValid())
args.append(QString::number(m_pid.pid()));
if (debugServer.executable.toString().contains("lldb-server")) {
args.append("platform");
args.append("--listen");
args.append(QString("*:%1").arg(portsGatherer->gdbServer().port()));
args.append("--server");
} else {
// Something resembling gdbserver
if (m_useMulti)
args.append("--multi");
if (m_pid.isValid())
args.append("--attach");
args.append(QString(":%1").arg(portsGatherer->gdbServer().port()));
if (m_pid.isValid())
args.append(QString::number(m_pid.pid()));
}
}
debugServer.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux);