Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb] add support for thread names on Windows #74731

Merged
merged 3 commits into from
Dec 21, 2023
Merged

[lldb] add support for thread names on Windows #74731

merged 3 commits into from
Dec 21, 2023

Conversation

oltolm
Copy link
Contributor

@oltolm oltolm commented Dec 7, 2023

This PR adds support for thread names in lldb on Windows.

(lldb) thr list
Process 2960 stopped
  thread #53: tid = 0x03a0, 0x00007ff84582db34 ntdll.dll`NtWaitForMultipleObjects + 20
  thread #29: tid = 0x04ec, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPUW.6'
  thread #89: tid = 0x057c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000019] physics[main]'
  thread #3: tid = 0x0648, 0x00007ff843c2cafe combase.dll`InternalDoATClassCreate + 39518
  thread #93: tid = 0x0688, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100501d] uMovie::StreamingThread'
  thread #1: tid = 0x087c, 0x00007ff842e7a104 win32u.dll`NtUserMsgWaitForMultipleObjectsEx + 20
  thread #96: tid = 0x0890, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1002020] HLE Video Decoder'
  thread #40: tid = 0x08e0, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Camera Thread'
  thread #78: tid = 0x0a04, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100000e] _gcm_intr_thread'
  thread #44: tid = 0x0a48, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'RSX.W1'
  thread #90: tid = 0x0b24, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100001a] physics[job]-000'
  thread #80: tid = 0x0c70, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000010] Resource Loader'
  thread #26: tid = 0x0c78, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPUW.3'
  thread #47: tid = 0x0ec4, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'RSX.W4'
  thread #18: tid = 0x0fe8, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'NetStart Hack'
  thread #36: tid = 0x106c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'cellAudio Thread'
  thread #69: tid = 0x1090, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPU[0x3000400] xf_appli_CellSpursKernel3'
  thread #5: tid = 0x1094, 0x00007ff845830a74 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
  thread #65: tid = 0x1234, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000008] xf_sound_SpursHdlr0'
  thread #9: tid = 0x12f8, 0x00007ff842e71224 win32u.dll`NtUserPostMessage + 20
  thread #60: tid = 0x13c4, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPU[0x0000200] xf_at3p_CellSpursKernel0'
  thread #46: tid = 0x1428, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'RSX.W3'
  thread #42: tid = 0x1470, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Overlay Input Thread'
  thread #91: tid = 0x1678, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100001b] nativeFiber Thread'
  thread #85: tid = 0x1718, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000015] snddrv_stream_preparing_thre'
  thread #13: tid = 0x19ac, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Tcp Over Udp Timeout Manager Thread'
  thread #31: tid = 0x1a00, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'CPU Profiler'
  thread #8: tid = 0x1a14, 0x00007ff84582d664 ntdll.dll`NtDelayExecution + 20
  thread #15: tid = 0x1b44, 0x00007ff84582d664 ntdll.dll`NtDelayExecution + 20, name = 'Network Thread'
  thread #39: tid = 0x1b68, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Gem Thread'
  thread #4: tid = 0x1b6c, 0x00007ff845830a74 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
  thread #79: tid = 0x2160, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100000f] closeAsync'
  thread #14: tid = 0x2200, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'MediaList Thread'
  thread #70: tid = 0x228c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPU[0x4000400] xf_appli_CellSpursKernel4'
  thread #97: tid = 0x229c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1002021] _atxdec_adapter_decode_thr_f'
  thread #17: tid = 0x22b8, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Signaling Manager Thread'
  thread #11: tid = 0x232c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Progress Dialog Server'
  thread #50: tid = 0x2360, 0x00007ff84582d8a4 ntdll.dll`NtYieldExecution + 20, name = 'rsx::thread'
  thread #59: tid = 0x254c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000004] xf_ms_SpursHdlr0'
  thread #49: tid = 0x2614, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'RSX.W6'
  thread #30: tid = 0x2618, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU Syscall Usage Thread'
  thread #20: tid = 0x2640, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'LV2 Watchdog Thread'

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 7, 2023

@llvm/pr-subscribers-lldb

Author: oltolm (oltolm)

Changes

This PR adds support for thread names in lldb on Windows.

(lldb) thr list
Process 2960 stopped
  thread #<!-- -->53: tid = 0x03a0, 0x00007ff84582db34 ntdll.dll`NtWaitForMultipleObjects + 20
  thread #<!-- -->29: tid = 0x04ec, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPUW.6'
  thread #<!-- -->89: tid = 0x057c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000019] physics[main]'
  thread #<!-- -->3: tid = 0x0648, 0x00007ff843c2cafe combase.dll`InternalDoATClassCreate + 39518
  thread #<!-- -->93: tid = 0x0688, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100501d] uMovie::StreamingThread'
  thread #<!-- -->1: tid = 0x087c, 0x00007ff842e7a104 win32u.dll`NtUserMsgWaitForMultipleObjectsEx + 20
  thread #<!-- -->96: tid = 0x0890, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1002020] HLE Video Decoder'
  thread #<!-- -->40: tid = 0x08e0, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Camera Thread'
  thread #<!-- -->78: tid = 0x0a04, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100000e] _gcm_intr_thread'
  thread #<!-- -->44: tid = 0x0a48, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'RSX.W1'
  thread #<!-- -->90: tid = 0x0b24, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100001a] physics[job]-000'
  thread #<!-- -->80: tid = 0x0c70, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000010] Resource Loader'
  thread #<!-- -->26: tid = 0x0c78, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPUW.3'
  thread #<!-- -->47: tid = 0x0ec4, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'RSX.W4'
  thread #<!-- -->18: tid = 0x0fe8, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'NetStart Hack'
  thread #<!-- -->36: tid = 0x106c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'cellAudio Thread'
  thread #<!-- -->69: tid = 0x1090, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPU[0x3000400] xf_appli_CellSpursKernel3'
  thread #<!-- -->5: tid = 0x1094, 0x00007ff845830a74 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
  thread #<!-- -->65: tid = 0x1234, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000008] xf_sound_SpursHdlr0'
  thread #<!-- -->9: tid = 0x12f8, 0x00007ff842e71224 win32u.dll`NtUserPostMessage + 20
  thread #<!-- -->60: tid = 0x13c4, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPU[0x0000200] xf_at3p_CellSpursKernel0'
  thread #<!-- -->46: tid = 0x1428, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'RSX.W3'
  thread #<!-- -->42: tid = 0x1470, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Overlay Input Thread'
  thread #<!-- -->91: tid = 0x1678, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100001b] nativeFiber Thread'
  thread #<!-- -->85: tid = 0x1718, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000015] snddrv_stream_preparing_thre'
  thread #<!-- -->13: tid = 0x19ac, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Tcp Over Udp Timeout Manager Thread'
  thread #<!-- -->31: tid = 0x1a00, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'CPU Profiler'
  thread #<!-- -->8: tid = 0x1a14, 0x00007ff84582d664 ntdll.dll`NtDelayExecution + 20
  thread #<!-- -->15: tid = 0x1b44, 0x00007ff84582d664 ntdll.dll`NtDelayExecution + 20, name = 'Network Thread'
  thread #<!-- -->39: tid = 0x1b68, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Gem Thread'
  thread #<!-- -->4: tid = 0x1b6c, 0x00007ff845830a74 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
  thread #<!-- -->79: tid = 0x2160, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100000f] closeAsync'
  thread #<!-- -->14: tid = 0x2200, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'MediaList Thread'
  thread #<!-- -->70: tid = 0x228c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPU[0x4000400] xf_appli_CellSpursKernel4'
  thread #<!-- -->97: tid = 0x229c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1002021] _atxdec_adapter_decode_thr_f'
  thread #<!-- -->17: tid = 0x22b8, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Signaling Manager Thread'
  thread #<!-- -->11: tid = 0x232c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'Progress Dialog Server'
  thread #<!-- -->50: tid = 0x2360, 0x00007ff84582d8a4 ntdll.dll`NtYieldExecution + 20, name = 'rsx::thread'
  thread #<!-- -->59: tid = 0x254c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000004] xf_ms_SpursHdlr0'
  thread #<!-- -->49: tid = 0x2614, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'RSX.W6'
  thread #<!-- -->30: tid = 0x2618, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU Syscall Usage Thread'
  thread #<!-- -->20: tid = 0x2640, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'LV2 Watchdog Thread'

Full diff: https://github.com/llvm/llvm-project/pull/74731.diff

2 Files Affected:

  • (modified) lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp (+31)
  • (modified) lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h (+2)
diff --git a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
index 37dc8f6d6d14a..d9e0fbcdf7ffd 100644
--- a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
@@ -10,6 +10,7 @@
 #include "lldb/Host/HostNativeThreadBase.h"
 #include "lldb/Host/windows/HostThreadWindows.h"
 #include "lldb/Host/windows/windows.h"
+#include "llvm/Support/ConvertUTF.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/Unwind.h"
 #include "lldb/Utility/LLDBLog.h"
@@ -33,6 +34,9 @@
 using namespace lldb;
 using namespace lldb_private;
 
+using GetThreadDescriptionFunctionPtr = HRESULT
+WINAPI (*)(HANDLE hThread, PWSTR *ppszThreadDescription);
+
 TargetThreadWindows::TargetThreadWindows(ProcessWindows &process,
                                          const HostThread &thread)
     : Thread(process, thread.GetNativeThread().GetThreadId()),
@@ -175,3 +179,30 @@ Status TargetThreadWindows::DoResume() {
 
   return Status();
 }
+
+const char *TargetThreadWindows::GetName() {
+  Log *log = GetLog(LLDBLog::Thread);
+  HMODULE hModule = ::LoadLibraryW(L"Kernel32.dll");
+  if (hModule) {
+    auto GetThreadDescription =
+        reinterpret_cast<GetThreadDescriptionFunctionPtr>(
+            ::GetProcAddress(hModule, "GetThreadDescription"));
+    LLDB_LOGF(log, "GetProcAddress: %p",
+              reinterpret_cast<void *>(GetThreadDescription));
+    if (GetThreadDescription) {
+      PWSTR pszThreadName;
+      if (SUCCEEDED(GetThreadDescription(
+              m_host_thread.GetNativeThread().GetSystemHandle(),
+              &pszThreadName))) {
+        LLDB_LOGF(log, "GetThreadDescription: %ls", pszThreadName);
+        llvm::convertUTF16ToUTF8String(
+            llvm::ArrayRef(reinterpret_cast<char *>(pszThreadName),
+                           wcslen(pszThreadName) * sizeof(wchar_t)),
+            m_name);
+        ::LocalFree(pszThreadName);
+      }
+    }
+  }
+
+  return m_name.c_str();
+}
diff --git a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h
index 2845847738f60..07e1db464ad59 100644
--- a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h
+++ b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h
@@ -34,6 +34,7 @@ class TargetThreadWindows : public lldb_private::Thread {
   lldb::RegisterContextSP
   CreateRegisterContextForFrame(StackFrame *frame) override;
   bool CalculateStopInfo() override;
+  const char *GetName() override;
 
   Status DoResume();
 
@@ -42,6 +43,7 @@ class TargetThreadWindows : public lldb_private::Thread {
 private:
   lldb::RegisterContextSP m_thread_reg_ctx_sp;
   HostThread m_host_thread;
+  std::string m_name;
 };
 } // namespace lldb_private
 

Copy link

github-actions bot commented Dec 7, 2023

:white_check_mark: With the latest revision this PR passed the C/C++ code formatter.

Comment on lines 185 to 189
HMODULE hModule = ::LoadLibraryW(L"Kernel32.dll");
if (hModule) {
auto GetThreadDescription =
reinterpret_cast<GetThreadDescriptionFunctionPtr>(
::GetProcAddress(hModule, "GetThreadDescription"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is only compiled on windows, why do we need to get the library handle manually and get the function pointer. Can't we just #include <processthreadsapi.h> and then call the function directly?

Copy link

@Fulgen301 Fulgen301 Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function was added in Windows 10 1607, which was also the only build (excluding Server 2016) where it isn't available in the header:

Windows Server 2016, Windows 10 LTSB 2016 and Windows 10 version 1607: GetThreadDescription is only available by Run Time Dynamic Linking in KernelBase.dll.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is compatibility that we are concerned about, I think that we should consider falling back to more ... esoteric solutions.

__try {
  RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(ULONG_PTR), (ULONG_PTR*)&info);  
} __except (EXCEPTION_EXECUTE_HANDLER) {
} 

Should be far more portable and is what VS also uses. This is documented at https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2015&redirectedfrom=MSDN.

I would be okay with also raising the requirements to a newer version of Windows as 1607 is RS1 which makes it more than 8 years old at this point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are talking about setting thread names, but I implemented getting a thread name from Windows.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is the set name below though.

Copy link
Member

@bulbazord bulbazord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks fine to me. Can you write a test?

Copy link
Collaborator

@clayborg clayborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like there is good reason for linking in the kernel32.dll, so code looks good to me. A windows only test that creates a thread with a known name would be great to add where we verify the name is correct.

@oltolm
Copy link
Contributor Author

oltolm commented Dec 8, 2023

I have added a test.

Copy link
Collaborator

@clayborg clayborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One other way to test is to create a python test that makes a test windows binary that creates a thread using the Windows APIs and then we set a breakpoint in one of the thread functions and then verify the thread name is returned in the output of "thread list" and via the python lldb.SBThread.GetName() function. The unit test verifies things work on the native layer.

That being said, I am ok with these changes, but I don't do any windows debugging, so it might be best some someone with windows experience to give the final ok

@bulbazord
Copy link
Member

@compnerd Perhaps you can take a look at this one? Not sure who does Windows work on LLDB these days.

Comment on lines 185 to 189
HMODULE hModule = ::LoadLibraryW(L"Kernel32.dll");
if (hModule) {
auto GetThreadDescription =
reinterpret_cast<GetThreadDescriptionFunctionPtr>(
::GetProcAddress(hModule, "GetThreadDescription"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is compatibility that we are concerned about, I think that we should consider falling back to more ... esoteric solutions.

__try {
  RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(ULONG_PTR), (ULONG_PTR*)&info);  
} __except (EXCEPTION_EXECUTE_HANDLER) {
} 

Should be far more portable and is what VS also uses. This is documented at https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2015&redirectedfrom=MSDN.

I would be okay with also raising the requirements to a newer version of Windows as 1607 is RS1 which makes it more than 8 years old at this point.

::GetProcAddress(hModule, "GetThreadDescription"));
LLDB_LOGF(log, "GetProcAddress: %p",
reinterpret_cast<void *>(GetThreadDescription));
if (GetThreadDescription) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An early out here would be nice to reduce indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Log *log = GetLog(LLDBLog::Thread);
HMODULE hModule = ::LoadLibraryW(L"Kernel32.dll");
if (hModule) {
auto GetThreadDescription =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be pulled out into a lambda and store the lookup rather than re-evaluating it each time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@oltolm
Copy link
Contributor Author

oltolm commented Dec 21, 2023

What happens next with my PR?

@DavidSpickett DavidSpickett changed the title lldb: add support for thread names on Windows [lldb] add support for thread names on Windows Dec 21, 2023
@DavidSpickett DavidSpickett merged commit 95e5839 into llvm:main Dec 21, 2023
4 checks passed
@DavidSpickett
Copy link
Collaborator

If you have permissions, once a PR is approved you can click "squash and merge" to land it. I've gone ahead and done that for you in this time.

@DavidSpickett
Copy link
Collaborator

You'll have email from at least one Linux builder. I believe I've fixed that link error with: 513c215

@oltolm
Copy link
Contributor Author

oltolm commented Dec 21, 2023

Thank you David, I didn't see a button for merging the PR.

@DavidSpickett
Copy link
Collaborator

Everything passed on Windows (https://lab.llvm.org/buildbot/#/builders/219/builds/7700) and the rest of the lldb specific bots are green. You may get a few more messages as other builders get to it (the Mac ones mainly), if it's a link error with lldbPluginProcessWindowsCommon then it's already been fixed and you can ignore it.

If you do miss a failure for a while, someone like me will deal with it or ping you about it here.

Thanks for the contribution!

@oltolm oltolm deleted the lldb_win_thread_names branch December 21, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants