[Lldb-commits] [lldb] [lldb-server][Windows] add support for thread name (PR #199983)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Thu May 28 03:18:16 PDT 2026


================
@@ -99,17 +101,25 @@ Status NativeThreadWindows::DoResume(lldb::StateType resume_state) {
 }
 
 std::string NativeThreadWindows::GetName() {
-  if (!m_name.empty())
+  Log *log = GetLog(LLDBLog::Thread);
+  static LazyImport<HRESULT(WINAPI *)(HANDLE, PWSTR *)> kGetThreadDescription{
----------------
DavidSpickett wrote:

My understanding is that this lookup returns an address in the process' address space for that function. So it depends on where the DLL got loaded, so we can't share it between processes but we can share it between threads of a process.

So using a static here is ok because this class deals with threads. Right?



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


More information about the lldb-commits mailing list