aboutsummaryrefslogtreecommitdiff
path: root/gdbserver
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-04-12 14:27:13 -0600
committerTom Tromey <tromey@adacore.com>2022-04-14 12:12:34 -0600
commit42a59714076cc14b1684ce822d3118835d4c6bbe (patch)
tree3d029226c037b6323d853bd637b3dfa0e7c84130 /gdbserver
parent44ac251ad202da57e134f160b6831a56a82a8cf0 (diff)
downloadgdb-42a59714076cc14b1684ce822d3118835d4c6bbe.zip
gdb-42a59714076cc14b1684ce822d3118835d4c6bbe.tar.gz
gdb-42a59714076cc14b1684ce822d3118835d4c6bbe.tar.bz2
Implement thread_name for gdbserver
This changes gdbserver to implement thread_name method.
Diffstat (limited to 'gdbserver')
-rw-r--r--gdbserver/win32-low.cc9
-rw-r--r--gdbserver/win32-low.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc
index 8fde3e9..16c13f3 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 8856a84..a1d7457 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. */