diff options
author | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-02-17 16:11:53 +0100 |
---|---|---|
committer | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-02-20 17:35:05 +0100 |
commit | a5a4d4cd0c5fb2240d8157c98e2fe5078f9d3263 (patch) | |
tree | 1e0cf29b5eb7beb9e8027df4b6c027bbbdefc82e /gdbserver/nto-low.cc | |
parent | 6532e7e378adbe326256ce2410ce753ec30b5ef1 (diff) | |
download | gdb-a5a4d4cd0c5fb2240d8157c98e2fe5078f9d3263.zip gdb-a5a4d4cd0c5fb2240d8157c98e2fe5078f9d3263.tar.gz gdb-a5a4d4cd0c5fb2240d8157c98e2fe5078f9d3263.tar.bz2 |
gdbserver: turn target ops 'fetch_registers' and 'store_registers' into methods
gdbserver/ChangeLog:
2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Turn process_stratum_target's fetch_registers and store_registers
ops into methods of process_target.
* target.h (struct process_stratum_target): Remove the target ops.
(class process_target): Add the target ops.
(fetch_inferior_registers): Update the macro.
(store_inferior_registers): Update the macro.
Update the derived classes and callers below.
* linux-low.cc (linux_target_ops): Update.
(linux_fetch_registers): Turn into ...
(linux_process_target::fetch_registers): ... this.
(linux_store_registers): Turn into ...
(linux_process_target::store_registers): ... this.
* linux-low.h (class linux_process_target): Update.
* lynx-low.cc (lynx_target_ops): Update.
(lynx_fetch_registers): Turn into ...
(lynx_process_target::fetch_registers): ... this.
(lynx_store_registers): Turn into ...
(lynx_process_target::store_registers): ... this.
* lynx-low.h (class lynx_process_target): Update.
* nto-low.cc (nto_target_ops): Update.
(nto_fetch_registers): Turn into ...
(nto_process_target::fetch_registers): ... this.
(nto_store_registers): Turn into ...
(nto_process_target::store_registers): ... this.
* nto-low.h (class nto_process_target): Update.
* win32-low.cc (win32_target_ops): Update.
(win32_fetch_inferior_registers): Turn into ...
(win32_process_target::fetch_registers): ... this.
(win32_store_inferior_registers): Turn into ...
(win32_process_target::store_registers): ... this.
* win32-low.h (class win32_process_target): Update.
Diffstat (limited to 'gdbserver/nto-low.cc')
-rw-r--r-- | gdbserver/nto-low.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gdbserver/nto-low.cc b/gdbserver/nto-low.cc index 6cac6eb..a051f36 100644 --- a/gdbserver/nto-low.cc +++ b/gdbserver/nto-low.cc @@ -623,8 +623,8 @@ nto_process_target::wait (ptid_t ptid, target_waitstatus *ourstatus, /* Fetch inferior's registers for currently selected thread (CURRENT_INFERIOR). If REGNO is -1, fetch all registers, or REGNO register only otherwise. */ -static void -nto_fetch_registers (struct regcache *regcache, int regno) +void +nto_process_target::fetch_registers (regcache *regcache, int regno) { int regsize; procfs_greg greg; @@ -671,8 +671,8 @@ nto_fetch_registers (struct regcache *regcache, int regno) /* Store registers for currently selected thread (CURRENT_INFERIOR). We always store all registers, regardless of REGNO. */ -static void -nto_store_registers (struct regcache *regcache, int regno) +void +nto_process_target::store_registers (regcache *regcache, int regno) { procfs_greg greg; int err; @@ -941,8 +941,6 @@ nto_sw_breakpoint_from_kind (int kind, int *size) static nto_process_target the_nto_target; static process_stratum_target nto_target_ops = { - nto_fetch_registers, - nto_store_registers, NULL, /* prepare_to_access_memory */ NULL, /* done_accessing_memory */ nto_read_memory, |