aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2025-06-25 08:09:36 +0200
committerGitHub <noreply@github.com>2025-06-25 08:09:36 +0200
commit0512d119fdf019b7c56e58f89b094ee5928b0a07 (patch)
treebacc7e9909d8420e57bb7c472c6a0a6ec1481bc9 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parent888f84f72c07dfad8f266d907799c4060835a960 (diff)
downloadllvm-0512d119fdf019b7c56e58f89b094ee5928b0a07.zip
llvm-0512d119fdf019b7c56e58f89b094ee5928b0a07.tar.gz
llvm-0512d119fdf019b7c56e58f89b094ee5928b0a07.tar.bz2
[lldb] Clean up GDBRemoteCommunication::StartDebugserverProcess (#145021)
The function was extremely messy in that it, depending on the set of arguments, it could either modify the Connection object in `this` or not. It had a lot of arguments, with each call site passing a different combination of null values. This PR: - packs "url" and "comm_fd" arguments into a variant as they are mutually exclusive - removes the (surprising) "null url *and* null comm_fd" code path which is not used as of https://github.com/llvm/llvm-project/pull/145017 - marks the function as `static` to make it clear it (now) does not operate on the `this` object. Depends on #145017
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 4e70fe8a..3f9c4dd 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -3494,9 +3494,9 @@ Status ProcessGDBRemote::LaunchAndConnectToDebugserver(
if (error.Fail())
return error;
- error = m_gdb_comm.StartDebugserverProcess(
- nullptr, GetTarget().GetPlatform().get(), debugserver_launch_info,
- nullptr, nullptr, shared_socket.GetSendableFD());
+ error = m_gdb_comm.StartDebugserverProcess(shared_socket.GetSendableFD(),
+ GetTarget().GetPlatform().get(),
+ debugserver_launch_info, nullptr);
if (error.Fail()) {
Log *log = GetLog(GDBRLog::Process);