https://github.com/da-viper updated https://github.com/llvm/llvm-project/pull/174837
>From 99ce67f1da842cb47d4bad771748faff166da6b3 Mon Sep 17 00:00:00 2001 From: Ebuka Ezike <[email protected]> Date: Wed, 7 Jan 2026 18:57:25 +0000 Subject: [PATCH 1/2] [lldb-dap][NFC] Shorten the event thread name on linux thread names are limited to 15 characters shorten the name of the event thread if necessary --- lldb/tools/lldb-dap/EventHelper.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lldb/tools/lldb-dap/EventHelper.cpp b/lldb/tools/lldb-dap/EventHelper.cpp index 01d4547e2d228..97ea96045ea4e 100644 --- a/lldb/tools/lldb-dap/EventHelper.cpp +++ b/lldb/tools/lldb-dap/EventHelper.cpp @@ -589,7 +589,12 @@ static void HandleDiagnosticEvent(const lldb::SBEvent &event, Log &log) { // is required. void EventThread(lldb::SBDebugger debugger, lldb::SBBroadcaster broadcaster, llvm::StringRef client_name, Log &log) { - llvm::set_thread_name("lldb.DAP.client." + client_name + ".event_handler"); + std::string thread_name = + llvm::formatv("lldb.DAP.client.{}.event_handler", client_name); + if (thread_name.length() > llvm::get_max_thread_name_length()) + thread_name = llvm::formatv("DAP.{}.evnt", client_name); + llvm::set_thread_name(thread_name); + lldb::SBListener listener = debugger.GetListener(); broadcaster.AddListener(listener, eBroadcastBitStopEventThread); debugger.GetBroadcaster().AddListener( >From dd40cc9313e34501efc7b591312d8b95e315e4c1 Mon Sep 17 00:00:00 2001 From: Ebuka Ezike <[email protected]> Date: Wed, 7 Jan 2026 22:17:44 +0000 Subject: [PATCH 2/2] [lldb-dap] add review changes --- lldb/tools/lldb-dap/EventHelper.cpp | 2 +- lldb/tools/lldb-dap/tool/lldb-dap.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/tools/lldb-dap/EventHelper.cpp b/lldb/tools/lldb-dap/EventHelper.cpp index 97ea96045ea4e..6c5a9127f131b 100644 --- a/lldb/tools/lldb-dap/EventHelper.cpp +++ b/lldb/tools/lldb-dap/EventHelper.cpp @@ -592,7 +592,7 @@ void EventThread(lldb::SBDebugger debugger, lldb::SBBroadcaster broadcaster, std::string thread_name = llvm::formatv("lldb.DAP.client.{}.event_handler", client_name); if (thread_name.length() > llvm::get_max_thread_name_length()) - thread_name = llvm::formatv("DAP.{}.evnt", client_name); + thread_name = llvm::formatv("DAP.{}.evt", client_name); llvm::set_thread_name(thread_name); lldb::SBListener listener = debugger.GetListener(); diff --git a/lldb/tools/lldb-dap/tool/lldb-dap.cpp b/lldb/tools/lldb-dap/tool/lldb-dap.cpp index e3b9d57e7d3a1..0119f4b1083a9 100644 --- a/lldb/tools/lldb-dap/tool/lldb-dap.cpp +++ b/lldb/tools/lldb-dap/tool/lldb-dap.cpp @@ -451,7 +451,7 @@ static llvm::Error serveConnection( if (connection_timeout_seconds) ResetConnectionTimeout(g_connection_timeout_mutex, g_connection_timeout_time_point); - std::string client_name = llvm::formatv("client_{0}", clientCount++).str(); + const std::string client_name = llvm::formatv("conn{0}", clientCount++); lldb::IOObjectSP io(std::move(sock)); // Move the client into a background thread to unblock accepting the next _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
