[Lldb-commits] [PATCH] D133427: [gdb-remote] Move broadcasting logic down to GDBRemoteClientBase
This revision was automatically updated to reflect the committed changes. Closed by commit rGbdb4468d3949: [gdb-remote] Move broadcasting logic down to GDBRemoteClientBase (authored by mgorny). Herald added a project: LLDB. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133427/new/ https://reviews.llvm.org/D133427 Files: lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationTest.cpp lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h Index: lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h === --- lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h +++ lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h @@ -53,8 +53,7 @@ class MockServer : public GDBRemoteCommunicationServer { public: - MockServer() - : GDBRemoteCommunicationServer("mock-server", "mock-server.listener") { + MockServer() : GDBRemoteCommunicationServer() { m_send_acks = false; m_send_error_strings = true; } Index: lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationTest.cpp === --- lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationTest.cpp +++ lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationTest.cpp @@ -17,8 +17,7 @@ class TestClient : public GDBRemoteCommunication { public: - TestClient() - : GDBRemoteCommunication("test.client", "test.client.listener") {} + TestClient() : GDBRemoteCommunication() {} PacketResult ReadPacket(StringExtractorGDBRemote ) { return GDBRemoteCommunication::ReadPacket(response, std::chrono::seconds(1), Index: lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp === --- lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp +++ lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp @@ -39,7 +39,7 @@ }; struct TestClient : public GDBRemoteClientBase { - TestClient() : GDBRemoteClientBase("test.client", "test.client.listener") { + TestClient() : GDBRemoteClientBase("test.client") { m_send_acks = false; } }; Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp === --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1168,7 +1168,7 @@ ListenerSP listener_sp( Listener::MakeListener("gdb-remote.resume-packet-sent")); if (listener_sp->StartListeningForEvents( - _gdb_comm, GDBRemoteCommunication::eBroadcastBitRunPacketSent)) { + _gdb_comm, GDBRemoteClientBase::eBroadcastBitRunPacketSent)) { listener_sp->StartListeningForEvents( _async_broadcaster, ProcessGDBRemote::eBroadcastBitAsyncThreadDidExit); Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp === --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp @@ -109,8 +109,7 @@ // GDBRemoteCommunicationServerPlatform constructor GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform( const Socket::SocketProtocol socket_protocol, const char *socket_scheme) -: GDBRemoteCommunicationServerCommon("gdb-remote.server", - "gdb-remote.server.rx_packet"), +: GDBRemoteCommunicationServerCommon(), m_socket_protocol(socket_protocol), m_socket_scheme(socket_scheme), m_spawned_pids_mutex(), m_port_map(), m_port_offset(0) { m_pending_gdb_server.pid = LLDB_INVALID_PROCESS_ID; Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp === --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++
[Lldb-commits] [PATCH] D133427: [gdb-remote] Move broadcasting logic down to GDBRemoteClientBase
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. cool. Comment at: lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationTest.cpp:20 public: - TestClient() - : GDBRemoteCommunication("test.client", "test.client.listener") {} + TestClient() : GDBRemoteCommunication() {} I think you can just delete this altogether. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133427/new/ https://reviews.llvm.org/D133427 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D133427: [gdb-remote] Move broadcasting logic down to GDBRemoteClientBase
mgorny created this revision. mgorny added reviewers: labath, krytarowski, emaste, jingham. Herald added a subscriber: arichardson. Herald added a project: All. mgorny requested review of this revision. Move the broadcasting support from GDBRemoteCommunication to GDBRemoteClientBase since this is where it is actually used. Remove GDBRemoteCommunication and subclass constructor arguments left over after Communication cleanup. Sponsored by: The FreeBSD Foundation https://reviews.llvm.org/D133427 Files: lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationTest.cpp lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h Index: lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h === --- lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h +++ lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h @@ -53,8 +53,7 @@ class MockServer : public GDBRemoteCommunicationServer { public: - MockServer() - : GDBRemoteCommunicationServer("mock-server", "mock-server.listener") { + MockServer() : GDBRemoteCommunicationServer() { m_send_acks = false; m_send_error_strings = true; } Index: lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationTest.cpp === --- lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationTest.cpp +++ lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationTest.cpp @@ -17,8 +17,7 @@ class TestClient : public GDBRemoteCommunication { public: - TestClient() - : GDBRemoteCommunication("test.client", "test.client.listener") {} + TestClient() : GDBRemoteCommunication() {} PacketResult ReadPacket(StringExtractorGDBRemote ) { return GDBRemoteCommunication::ReadPacket(response, std::chrono::seconds(1), Index: lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp === --- lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp +++ lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp @@ -39,7 +39,7 @@ }; struct TestClient : public GDBRemoteClientBase { - TestClient() : GDBRemoteClientBase("test.client", "test.client.listener") { + TestClient() : GDBRemoteClientBase("test.client") { m_send_acks = false; } }; Index: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp === --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1168,7 +1168,7 @@ ListenerSP listener_sp( Listener::MakeListener("gdb-remote.resume-packet-sent")); if (listener_sp->StartListeningForEvents( - _gdb_comm, GDBRemoteCommunication::eBroadcastBitRunPacketSent)) { + _gdb_comm, GDBRemoteClientBase::eBroadcastBitRunPacketSent)) { listener_sp->StartListeningForEvents( _async_broadcaster, ProcessGDBRemote::eBroadcastBitAsyncThreadDidExit); Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp === --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp @@ -109,8 +109,7 @@ // GDBRemoteCommunicationServerPlatform constructor GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform( const Socket::SocketProtocol socket_protocol, const char *socket_scheme) -: GDBRemoteCommunicationServerCommon("gdb-remote.server", - "gdb-remote.server.rx_packet"), +: GDBRemoteCommunicationServerCommon(), m_socket_protocol(socket_protocol), m_socket_scheme(socket_scheme), m_spawned_pids_mutex(), m_port_map(), m_port_offset(0) { m_pending_gdb_server.pid = LLDB_INVALID_PROCESS_ID; Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp