aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/linux-low.cc
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-04-02 15:11:24 +0200
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-04-02 15:11:24 +0200
commitbd70b1f240b24d8c9b08868ca777f5a81d13c0c2 (patch)
tree1bee5bab18f4d2addd3b88fe914c236d07a0c4fd /gdbserver/linux-low.cc
parentdaca57a7de50f97a4e8df917447561617a0298b2 (diff)
downloadgdb-bd70b1f240b24d8c9b08868ca777f5a81d13c0c2.zip
gdb-bd70b1f240b24d8c9b08868ca777f5a81d13c0c2.tar.gz
gdb-bd70b1f240b24d8c9b08868ca777f5a81d13c0c2.tar.bz2
gdbserver/linux-low: turn 'fetch_register' into a method
gdbserver/ChangeLog: 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn the 'fetch_register' linux target op into a method of linux_process_target. * linux-low.h (struct linux_target_ops) <fetch_register>: Remove. (class linux_process_target) <low_fetch_register>: Declare. * linux-x86-low.cc (the_low_target) * linux-aarch64-low.cc (the_low_target) * linux-arm-low.cc (the_low_target) * linux-bfin-low.cc (the_low_target) * linux-cris-low.cc (the_low_target) * linux-crisv32-low.cc (the_low_target) * linux-m32r-low.cc (the_low_target) * linux-m68k-low.cc (the_low_target) * linux-nios2-low.cc (the_low_target) * linux-ppc-low.cc (the_low_target) * linux-s390-low.cc (the_low_target) * linux-sh-low.cc (the_low_target) * linux-sparc-low.cc (the_low_target) * linux-tic6x-low.cc (the_low_target) * linux-tile-low.cc (the_low_target) * linux-xtensa-low.cc (the_low_target): Remove the op field. * linux-ia64-low.cc (class ia64_target) <low_fetch_register>: Declare. (ia64_fetch_register): Turn into... (ia64_target::low_fetch_register): ...this. (the_low_target): Remove the op field. * linux-mips-low.cc (class mips_target) <low_fetch_register>: Declare. (mips_fetch_register): Turn into... (mips_target::low_fetch_register): ...this. (the_low_target): Remove the op field. * linux-riscv-low.cc (class riscv_target) <low_fetch_register>: Declare. (riscv_fetch_register): Turn into... (riscv_target::low_fetch_register): ...this. (the_low_target): Remove the op field. Update the callers below. * linux-low.cc (linux_process_target::fetch_registers) (linux_process_target::low_fetch_register)
Diffstat (limited to 'gdbserver/linux-low.cc')
-rw-r--r--gdbserver/linux-low.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index caa2d8d..c77e92d 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -5569,10 +5569,9 @@ linux_process_target::fetch_registers (regcache *regcache, int regno)
if (regno == -1)
{
- if (the_low_target.fetch_register != NULL
- && regs_info->usrregs != NULL)
+ if (regs_info->usrregs != NULL)
for (regno = 0; regno < regs_info->usrregs->num_regs; regno++)
- (*the_low_target.fetch_register) (regcache, regno);
+ low_fetch_register (regcache, regno);
all = regsets_fetch_inferior_registers (regs_info->regsets_info, regcache);
if (regs_info->usrregs != NULL)
@@ -5580,8 +5579,7 @@ linux_process_target::fetch_registers (regcache *regcache, int regno)
}
else
{
- if (the_low_target.fetch_register != NULL
- && (*the_low_target.fetch_register) (regcache, regno))
+ if (low_fetch_register (regcache, regno))
return;
use_regsets = linux_register_in_regsets (regs_info, regno);
@@ -5618,6 +5616,11 @@ linux_process_target::store_registers (regcache *regcache, int regno)
}
}
+bool
+linux_process_target::low_fetch_register (regcache *regcache, int regno)
+{
+ return false;
+}
/* A wrapper for the read_memory target op. */