From 7f63b89b3a4229c2274f613111a907623853351f Mon Sep 17 00:00:00 2001 From: Tankut Baris Aktemur Date: Mon, 17 Feb 2020 16:12:02 +0100 Subject: gdbserver: turn target ops 'thread_name' and 'thread_handle' into methods gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur Turn process_stratum_target's thread_name and thread_handle ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. (target_thread_name): Update the macro. (target_thread_handle): Update the macro. * target.cc (process_target::thread_name): Define. (process_target::thread_handle): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_process_target::thread_name): Define. (linux_process_target::thread_handle): Define. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update. --- gdbserver/linux-low.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gdbserver/linux-low.h') diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h index ae422b8..2acd65f 100644 --- a/gdbserver/linux-low.h +++ b/gdbserver/linux-low.h @@ -468,6 +468,13 @@ public: const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override; int breakpoint_kind_from_current_state (CORE_ADDR *pcptr) override; + + const char *thread_name (ptid_t thread) override; + +#if USE_THREAD_DB + bool thread_handle (ptid_t ptid, gdb_byte **handle, + int *handle_len) override; +#endif }; #define get_thread_lwp(thr) ((struct lwp_info *) (thread_target_data (thr))) -- cgit v1.1