aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-04-13 08:45:34 -0600
committerTom Tromey <tromey@adacore.com>2022-04-14 12:12:35 -0600
commit8bbdbd6985d8d7615bab69f97f07e8bb78fb98f8 (patch)
tree75278187c8faf5a564fc459afc9e29aa2be382fc /gdb/windows-nat.c
parent1ea519ec192d68397d8b22f55072fc7ba0c5e36c (diff)
downloadgdb-8bbdbd6985d8d7615bab69f97f07e8bb78fb98f8.zip
gdb-8bbdbd6985d8d7615bab69f97f07e8bb78fb98f8.tar.gz
gdb-8bbdbd6985d8d7615bab69f97f07e8bb78fb98f8.tar.bz2
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
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r--gdb/windows-nat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 581eb47..1068558 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2997,8 +2997,10 @@ windows_nat_target::get_ada_task_ptid (long lwp, ULONGEST thread)
const char *
windows_nat_target::thread_name (struct thread_info *thr)
{
- return windows_process.thread_rec (thr->ptid,
- DONT_INVALIDATE_CONTEXT)->name.get ();
+ windows_thread_info *th
+ = windows_process.thread_rec (thr->ptid,
+ DONT_INVALIDATE_CONTEXT);
+ return th->thread_name ();
}