aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-04-02 12:09:45 +0200
committerhjk <hjk@qt.io>2020-04-02 15:07:00 +0000
commitfb784a1f805946cb422034b3882b862b5ad33f45 (patch)
tree8dd3af24d3750d8ab9d97f6994cfb2772ee49504
parentaec55633642273db31eaf5e9c41b2c41db69428c (diff)
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>
-rw-r--r--src/plugins/debugger/debuggerruncontrol.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp
index 05ad558feb..463342357b 100644
--- a/src/plugins/debugger/debuggerruncontrol.cpp
+++ b/src/plugins/debugger/debuggerruncontrol.cpp
@@ -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);