[Lldb-commits] [lldb] [lldb-dap][NFC] Shorten the event thread name (PR #174837)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 7 14:19:35 PST 2026


================
@@ -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);
----------------
JDevlieghere wrote:

Or maybe just use the number as the client name?

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


More information about the lldb-commits mailing list