From cf9546b826619890e965367a3e4d0da1991ba929 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 24 Jun 2025 11:11:35 +0200 Subject: [lldb] Remove GDBRemoteCommunication::ConnectLocally (#145293) Originally added for reproducers, it is now only used for test code. While we could make it a test helper, I think that after #145015 it is simple enough to not be needed. Also squeeze in a change to make ConnectionFileDescriptor accept a unique_ptr. --- .../Process/gdb-remote/GDBRemoteCommunication.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index d1f57cc..0d3ead8 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -1128,8 +1128,8 @@ Status GDBRemoteCommunication::StartDebugserverProcess( Socket *accepted_socket = nullptr; error = sock_up->Accept(/*timeout=*/std::nullopt, accepted_socket); if (accepted_socket) { - SetConnection( - std::make_unique(accepted_socket)); + SetConnection(std::make_unique( + std::unique_ptr(accepted_socket))); } } @@ -1138,20 +1138,6 @@ Status GDBRemoteCommunication::StartDebugserverProcess( void GDBRemoteCommunication::DumpHistory(Stream &strm) { m_history.Dump(strm); } -llvm::Error -GDBRemoteCommunication::ConnectLocally(GDBRemoteCommunication &client, - GDBRemoteCommunication &server) { - llvm::Expected pair = Socket::CreatePair(); - if (!pair) - return pair.takeError(); - - client.SetConnection( - std::make_unique(pair->first.release())); - server.SetConnection( - std::make_unique(pair->second.release())); - return llvm::Error::success(); -} - GDBRemoteCommunication::ScopedTimeout::ScopedTimeout( GDBRemoteCommunication &gdb_comm, std::chrono::seconds timeout) : m_gdb_comm(gdb_comm), m_saved_timeout(0), m_timeout_modified(false) { -- cgit v1.1