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

via lldb-commits lldb-commits at lists.llvm.org
Thu May 28 00:49:30 PDT 2026


================
@@ -0,0 +1,16 @@
+#include <processthreadsapi.h>
+#include <stdio.h>
+#include <windows.h>
+
+int main() {
+  // break here
+  HANDLE thread = GetCurrentThread();
+  HRESULT hr = SetThreadDescription(thread, L"ThreadName");
+  if (FAILED(hr)) {
+    fprintf(stderr, "SetThreadDescription failed: 0x%08lx\n", hr);
+    return 1;
+  }
+
+  printf("Thread name set successfully.\n"); // break here
+  return 0;
+}
----------------
Nerixyz wrote:

```suggestion
}

```

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


More information about the lldb-commits mailing list