Use GetThreadDescription on Windows

Windows 10 introduced SetThreadDescription and GetThreadDescription, a
simpler way to set a thread's name.  This changes gdb and gdbserver to
use this convention when it is available.

This is part of PR win32/29050.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29050
This commit is contained in:
Tom Tromey
2022-04-13 08:45:34 -06:00
parent 1ea519ec19
commit 8bbdbd6985
4 changed files with 47 additions and 3 deletions

View File

@@ -1508,7 +1508,7 @@ win32_process_target::thread_name (ptid_t thread)
windows_thread_info *th
= windows_process.thread_rec (current_thread_ptid (),
DONT_INVALIDATE_CONTEXT);
return th->name.get ();
return th->thread_name ();
}
/* The win32 target ops object. */