[Lldb-commits] [lldb] [lldb] Removed gdbserver ports map from lldb-server (PR #104238)

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 15 06:12:45 PDT 2024


================
@@ -601,15 +570,24 @@ int main_platform(int argc, char *argv[]) {
       // If not running as a server, this process will not accept
       // connections while a connection is active.
       acceptor_up.reset();
-
-      // When not running in server mode, use all available ports
-      platform.SetPortMap(std::move(gdbserver_portmap));
     }
 
     platform.SetConnection(std::unique_ptr<Connection>(conn));
     client_handle(platform, inferior_arguments);
   } while (g_server);
 
+  // FIXME: Make TCPSocket::CloseListenSockets() public and implement
+  // Acceptor::Close().
+  /*
+  if (acceptor_gdb && gdb_thread.IsJoinable()) {
+    g_listen_gdb = false;
+    static_cast<TCPSocket *>(acceptor_gdb->m_listener_socket_up.get())
+        ->CloseListenSockets();
+    lldb::thread_result_t result;
+    gdb_thread.Join(&result);
+  }
+  */
+
----------------
slydiman wrote:

Oh, Linux... Such pattern works just fine on Windows. I saw MainLoop. But I think it is much safer just exit the app. Terminating the main thread is enough. I will remove this comment in the code and the g_listen_gdb flag.

https://github.com/llvm/llvm-project/pull/104238


More information about the lldb-commits mailing list