From: Tom Tromey Date: Tue, 12 Apr 2022 20:27:13 +0000 (-0600) Subject: Implement thread_name for gdbserver X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42a59714076cc14b1684ce822d3118835d4c6bbe;p=binutils-gdb.git Implement thread_name for gdbserver This changes gdbserver to implement thread_name method. --- diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index 8fde3e95b2d..16c13f32d77 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -1502,6 +1502,15 @@ win32_process_target::write_pc (struct regcache *regcache, CORE_ADDR pc) return (*the_low_target.set_pc) (regcache, pc); } +const char * +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 (); +} + /* The win32 target ops object. */ static win32_process_target the_win32_target; diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h index 8856a84baa3..a1d74573cc9 100644 --- a/gdbserver/win32-low.h +++ b/gdbserver/win32-low.h @@ -158,6 +158,8 @@ public: bool stopped_by_sw_breakpoint () override; bool supports_stopped_by_sw_breakpoint () override; + + const char *thread_name (ptid_t thread) override; }; /* Retrieve the context for this thread, if not already retrieved. */