aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/linux-low.cc
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-02-17 16:11:59 +0100
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-02-20 17:35:14 +0100
commit68119632a065f7d2a1bdd4c9524484c741544f24 (patch)
treef2c958ff2d66bde6e50c1a95d0db2f16f649dac5 /gdbserver/linux-low.cc
parent770d8f6a51200bb4bf1228eba928e24e5d7fff86 (diff)
downloadfsf-binutils-gdb-68119632a065f7d2a1bdd4c9524484c741544f24.zip
fsf-binutils-gdb-68119632a065f7d2a1bdd4c9524484c741544f24.tar.gz
fsf-binutils-gdb-68119632a065f7d2a1bdd4c9524484c741544f24.tar.bz2
gdbserver: turn target op 'thread_stopped' into a method
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's thread_stopped op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. Also add 'supports_thread_stopped'. (target_thread_stopped): Update the macro. * target.cc (process_target::thread_stopped): Define. (process_target::supports_thread_stopped): Define. (prepare_to_access_memory): Update. Update the derived classes and callers below. * server.cc (queue_stop_reply_callback): Update. * linux-low.cc (linux_target_ops): Update. (linux_process_target::supports_thread_stopped): Define. (linux_thread_stopped): Turn into ... (linux_process_target::thread_stopped): ... this. * 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.
Diffstat (limited to 'gdbserver/linux-low.cc')
-rw-r--r--gdbserver/linux-low.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 90b5fcb..8d5881f 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -6572,8 +6572,14 @@ linux_process_target::write_pc (regcache *regcache, CORE_ADDR pc)
(*the_low_target.set_pc) (regcache, pc);
}
-static int
-linux_thread_stopped (struct thread_info *thread)
+bool
+linux_process_target::supports_thread_stopped ()
+{
+ return true;
+}
+
+bool
+linux_process_target::thread_stopped (thread_info *thread)
{
return get_thread_lwp (thread)->stopped;
}
@@ -7449,7 +7455,6 @@ linux_get_hwcap2 (int wordsize)
static linux_process_target the_linux_target;
static process_stratum_target linux_target_ops = {
- linux_thread_stopped,
NULL,
linux_pause_all,
linux_unpause_all,