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:53 +0100
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-02-20 17:35:05 +0100
commit79b4408780b27eeb60de7f3fe10bc654dddcf067 (patch)
treea5e3f35e999c60cd768f29be023cdb523a2b8995 /gdbserver/linux-low.cc
parenta5a4d4cd0c5fb2240d8157c98e2fe5078f9d3263 (diff)
downloadgdb-79b4408780b27eeb60de7f3fe10bc654dddcf067.zip
gdb-79b4408780b27eeb60de7f3fe10bc654dddcf067.tar.gz
gdb-79b4408780b27eeb60de7f3fe10bc654dddcf067.tar.bz2
gdbserver: turn prepare_to_access_memory & done_accessing_memory into methods
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's prepare_to_access_memory and done_accessing_memory ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. * target.cc (process_target::prepare_to_access_memory): Define. (process_target::done_accessing_memory): Define. (prepare_to_access_memory): Update. (done_accessing_memory): Update. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_prepare_to_access_memory): Turn into ... (linux_process_target::prepare_to_access_memory): ... this. (linux_done_accessing_memory): Turn into ... (linux_process_target::done_accessing_memory): ... 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.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 7cf7d90..6f408ad 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -6505,8 +6505,8 @@ linux_unpause_all (int unfreeze)
unstop_all_lwps (unfreeze, NULL);
}
-static int
-linux_prepare_to_access_memory (void)
+int
+linux_process_target::prepare_to_access_memory ()
{
/* Neither ptrace nor /proc/PID/mem allow accessing memory through a
running LWP. */
@@ -6515,8 +6515,8 @@ linux_prepare_to_access_memory (void)
return 0;
}
-static void
-linux_done_accessing_memory (void)
+void
+linux_process_target::done_accessing_memory ()
{
/* Neither ptrace nor /proc/PID/mem allow accessing memory through a
running LWP. */
@@ -7359,8 +7359,6 @@ linux_get_hwcap2 (int wordsize)
static linux_process_target the_linux_target;
static process_stratum_target linux_target_ops = {
- linux_prepare_to_access_memory,
- linux_done_accessing_memory,
linux_read_memory,
linux_write_memory,
linux_look_up_symbols,