https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/199983
Windows threads only have a name if the debuggee calls [`SetThreadDescription`](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setthreaddescription). When running with lldb-server.exe, that name is currently synthesised to the executable's name. This patch drops this synthesised name mechanism entirely to match the current `ProcessWindows` behavior (which does not print a thread's name). It fixes the following tests when running with `LLDB_USE_LLDB_SERVER=1`. - `SymbolFile/NativePDB/stack_unwinding01.cpp` - `SymbolFile/PDB/add-symbols.cpp` >From a0aed4b7998ad8717e80d417c13dc33149f7f147 Mon Sep 17 00:00:00 2001 From: Charles Zablit <[email protected]> Date: Wed, 27 May 2026 13:52:22 +0100 Subject: [PATCH] [lldb][Windows] Don't synthesise a fake thread name from the executable --- .../Process/Windows/Common/NativeThreadWindows.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp index 442af86af40d2..598bbdf6c9eed 100644 --- a/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp @@ -99,17 +99,8 @@ Status NativeThreadWindows::DoResume(lldb::StateType resume_state) { } std::string NativeThreadWindows::GetName() { - if (!m_name.empty()) - return m_name; - - // Name is not a property of the Windows thread. Create one with the - // process's. - NativeProcessProtocol &process = GetProcess(); - ProcessInstanceInfo process_info; - if (Host::GetProcessInfo(process.GetID(), process_info)) { - std::string process_name(process_info.GetName()); - m_name = process_name; - } + // Windows threads only have a name when the inferior calls + // SetThreadDescription explicitly. return m_name; } _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
