Author: David Spickett Date: 2021-09-08T15:14:02Z New Revision: d2189b5c4b011201f784ed7f503287c543076f91
URL: https://github.com/llvm/llvm-project/commit/d2189b5c4b011201f784ed7f503287c543076f91 DIFF: https://github.com/llvm/llvm-project/commit/d2189b5c4b011201f784ed7f503287c543076f91.diff LOG: [lldb] Remove unused GDBRemoteCommunicationClient::SendAttach function Reviewed By: labath Differential Revision: https://reviews.llvm.org/D109427 Added: Modified: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h Removed: ################################################################################ diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index c38a4ee19d152..6dcc73c3e43de 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -1369,24 +1369,6 @@ bool GDBRemoteCommunicationClient::GetHostInfo(bool force) { return m_qHostInfo_is_valid == eLazyBoolYes; } -int GDBRemoteCommunicationClient::SendAttach( - lldb::pid_t pid, StringExtractorGDBRemote &response) { - if (pid != LLDB_INVALID_PROCESS_ID) { - char packet[64]; - const int packet_len = - ::snprintf(packet, sizeof(packet), "vAttach;%" PRIx64, pid); - UNUSED_IF_ASSERT_DISABLED(packet_len); - assert(packet_len < (int)sizeof(packet)); - if (SendPacketAndWaitForResponse(packet, response) == - PacketResult::Success) { - if (response.IsErrorResponse()) - return response.GetError(); - return 0; - } - } - return -1; -} - int GDBRemoteCommunicationClient::SendStdinNotification(const char *data, size_t data_len) { StreamString packet; diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h index 63bccc8781c8a..00625088d42a0 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h @@ -147,21 +147,6 @@ class GDBRemoteCommunicationClient : public GDBRemoteClientBase { int SendLaunchEventDataPacket(const char *data, bool *was_supported = nullptr); - /// Sends a "vAttach:PID" where PID is in hex. - /// - /// \param[in] pid - /// A process ID for the remote gdb server to attach to. - /// - /// \param[out] response - /// The response received from the gdb server. If the return - /// value is zero, \a response will contain a stop reply - /// packet. - /// - /// \return - /// Zero if the attach was successful, or an error indicating - /// an error code. - int SendAttach(lldb::pid_t pid, StringExtractorGDBRemote &response); - /// Sends a GDB remote protocol 'I' packet that delivers stdin /// data to the remote process. /// _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits