From aa8d21c9bb43baaa35f456a3d371942a26cdce4e Mon Sep 17 00:00:00 2001 From: Tankut Baris Aktemur Date: Thu, 2 Apr 2020 15:11:23 +0200 Subject: gdbserver/linux-low: turn 'regs_info' into a method gdbserver/ChangeLog: 2020-04-02 Tankut Baris Aktemur Turn the 'regs_info' linux target op into a method of linux_process_target. * linux-low.h (struct linux_target_ops) : Remove. (class linux_process_target) : Define. Update the callers below. * linux-low.cc (linux_process_target::fetch_registers) (linux_process_target::store_registers) * proc-service.cc (gregset_info) * linux-x86-low.cc (class x86_target) : Declare. (x86_linux_regs_info): Turn into ... (x86_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-aarch64-low.cc (class aarch64_target) : Declare. (aarch64_regs_info): Turn into ... (aarch64_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-arm-low.cc (class arm_target) : Declare. (arm_regs_info): Turn into ... (arm_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-bfin-low.cc (class bfin_target) : Declare. (bfin_regs_info): Turn into ... (bfin_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-cris-low.cc (class cris_target) : Declare. (cris_regs_info): Turn into ... (cris_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-crisv32-low.cc (class crisv32_target) : Declare. (crisv32_regs_info): Turn into ... (crisv32_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-ia64-low.cc (class ia64_target) : Declare. (ia64_regs_info): Turn into ... (ia64_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-m32r-low.cc (class m32r_target) : Declare. (m32r_regs_info): Turn into ... (m32r_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-m68k-low.cc (class m68k_target) : Declare. (m68k_regs_info): Turn into ... (m68k_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-mips-low.cc (class mips_target) : Declare. (mips_regs_info): Turn into ... (mips_target::get_regs_info): ...this. (the_low_target): Remove the op field. (get_usrregs_info): Update the call to the op. * linux-nios2-low.cc (class nios2_target) : Declare. (nios2_regs_info): Turn into ... (nios2_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-ppc-low.cc (class ppc_target) : Declare. (ppc_regs_info): Turn into ... (ppc_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-riscv-low.cc (class riscv_target) : Declare. (riscv_regs_info): Turn into ... (riscv_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-s390-low.cc (class s390_target) : Declare. (s390_regs_info): Turn into ... (s390_target::get_regs_info): ...this. (the_low_target): Remove the op field. (s390_collect_ptrace_register) (s390_supply_ptrace_register) (s390_fill_gregset): Update the call to the op. * linux-sh-low.cc (class sh_target) : Declare. (sh_regs_info): Turn into ... (sh_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-sparc-low.cc (class sparc_target) : Declare. (sparc_regs_info): Turn into ... (sparc_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-tic6x-low.cc (class tic6x_target) : Declare. (tic6x_regs_info): Turn into ... (tic6x_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-tile-low.cc (class tile_target) : Declare. (tile_regs_info): Turn into ... (tile_target::get_regs_info): ...this. (the_low_target): Remove the op field. * linux-xtensa-low.cc (class xtensa_target) : Declare. (xtensa_regs_info): Turn into ... (xtensa_target::get_regs_info): ...this. (the_low_target): Remove the op field. --- gdbserver/linux-m68k-low.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gdbserver/linux-m68k-low.cc') diff --git a/gdbserver/linux-m68k-low.cc b/gdbserver/linux-m68k-low.cc index 667ca2e..cbecc7a 100644 --- a/gdbserver/linux-m68k-low.cc +++ b/gdbserver/linux-m68k-low.cc @@ -25,6 +25,8 @@ class m68k_target : public linux_process_target { public: + const regs_info *get_regs_info () override; + protected: void low_arch_setup () override; @@ -195,17 +197,17 @@ static struct usrregs_info m68k_usrregs_info = m68k_regmap, }; -static struct regs_info regs_info = +static struct regs_info myregs_info = { NULL, /* regset_bitmap */ &m68k_usrregs_info, &m68k_regsets_info }; -static const struct regs_info * -m68k_regs_info (void) +const regs_info * +m68k_target::get_regs_info () { - return ®s_info; + return &myregs_info; } void @@ -223,7 +225,6 @@ m68k_supports_hardware_single_step (void) } struct linux_target_ops the_low_target = { - m68k_regs_info, m68k_cannot_fetch_register, m68k_cannot_store_register, NULL, /* fetch_register */ -- cgit v1.1