Merge remote-tracking branch 'origin/4.12'

Change-Id: I79083060dfc3bc4408123acd3b7305b9701650fd
This commit is contained in:
Eike Ziller
2020-04-03 08:12:52 +02:00
110 changed files with 1245 additions and 767 deletions

View File

@@ -325,6 +325,11 @@ void DebuggerRunTool::setSymbolFile(const FilePath &symbolFile)
m_runParameters.symbolFile = symbolFile;
}
void DebuggerRunTool::setLldbPlatform(const QString &platform)
{
m_runParameters.platform = platform;
}
void DebuggerRunTool::setRemoteChannel(const QString &channel)
{
m_runParameters.remoteChannel = channel;
@@ -1078,9 +1083,9 @@ DebugServerRunner::DebugServerRunner(RunControl *runControl, DebugServerPortsGat
setStarter([this, runControl, mainRunnable, portsGatherer] {
QTC_ASSERT(portsGatherer, reportFailure(); return);
Runnable gdbserver;
gdbserver.environment = mainRunnable.environment;
gdbserver.workingDirectory = mainRunnable.workingDirectory;
Runnable debugServer;
debugServer.environment = mainRunnable.environment;
debugServer.workingDirectory = mainRunnable.workingDirectory;
QStringList args = QtcProcess::splitArgs(mainRunnable.commandLineArguments, OsTypeLinux);
@@ -1092,23 +1097,31 @@ DebugServerRunner::DebugServerRunner(RunControl *runControl, DebugServerPortsGat
portsGatherer->qmlServer()));
}
if (isQmlDebugging && !isCppDebugging) {
gdbserver.executable = mainRunnable.executable; // FIXME: Case should not happen?
debugServer.executable = mainRunnable.executable; // FIXME: Case should not happen?
} else {
gdbserver.executable = FilePath::fromString(runControl->device()->debugServerPath());
if (gdbserver.executable.isEmpty())
gdbserver.executable = FilePath::fromString("gdbserver");
debugServer.executable = FilePath::fromString(runControl->device()->debugServerPath());
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()));
}
}
gdbserver.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux);
debugServer.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux);
doStart(gdbserver, runControl->device());
doStart(debugServer, runControl->device());
});
}