diff options
author | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-04-02 15:11:24 +0200 |
---|---|---|
committer | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-04-02 15:11:24 +0200 |
commit | daca57a7de50f97a4e8df917447561617a0298b2 (patch) | |
tree | c73e1076e18bd72edf5d8fc252349c7f33ed5121 /gdbserver/linux-cris-low.cc | |
parent | aa8d21c9bb43baaa35f456a3d371942a26cdce4e (diff) | |
download | gdb-daca57a7de50f97a4e8df917447561617a0298b2.zip gdb-daca57a7de50f97a4e8df917447561617a0298b2.tar.gz gdb-daca57a7de50f97a4e8df917447561617a0298b2.tar.bz2 |
gdbserver/linux-low: turn 'cannot_{fetch/store}_register' into methods
gdbserver/ChangeLog:
2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Turn the 'cannot_fetch_register' and 'cannot_store_register'
linux target ops into methods of linux_process_target.
* linux-low.h (struct linux_target_ops): Remove the low target ops.
(class linux_process_target) <fetch_register>
<store_register>
<usr_fetch_inferior_registers>
<usr_store_inferior_registers>
<low_cannot_fetch_register>
<low_cannot_fetch_register> Declare.
* linux-low.cc (fetch_register): Turn into...
(linux_process_target::fetch_register): ...this.
(store_register): Turn into ...
(linux_process_target::store_register): ...this.
(usr_fetch_inferior_registers): Turn into...
(linux_process_target::usr_fetch_inferior_registers): ...this.
(usr_store_inferior_registers): Turn into...
(linux_process_target::usr_store_inferior_registers): ...this.
* linux-x86-low.cc (class x86_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(x86_cannot_store_register): Turn into...
(x86_target::low_cannot_store_register): ...this.
(x86_cannot_fetch_register): Turn into...
(x86_target::low_cannot_fetch_register): ...this.
(the_low_target): Remove the target op fields.
* linux-aarch64-low.cc (class aarch64_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(aarch64_target::low_cannot_fetch_register)
(aarch64_target::low_cannot_store_register): Define.
(the_low_target): Remove the op fields.
* linux-arm-low.cc (class arm_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(arm_cannot_fetch_register): Turn into...
(arm_target::low_cannot_fetch_register): ...this.
(arm_cannot_store_register): Turn into...
(arm_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-bfin-low.cc (class bfin_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(bfin_cannot_fetch_register): Turn into...
(bfin_target::low_cannot_fetch_register): ...this.
(bfin_cannot_store_register): Turn into...
(bfin_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-cris-low.cc (class cris_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(cris_cannot_fetch_register): Turn into...
(cris_target::low_cannot_fetch_register): ...this.
(cris_cannot_store_register): Turn into...
(cris_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-crisv32-low.cc (class crisv32_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(crisv32_target::low_cannot_fetch_register)
(crisv32_target::low_cannot_store_register): Define.
(the_low_target): Remove the op fields.
* linux-ia64-low.cc (class ia64_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(ia64_cannot_fetch_register): Turn into...
(ia64_target::low_cannot_fetch_register): ...this.
(ia64_cannot_store_register): Turn into...
(ia64_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-m32r-low.cc (class m32r_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(m32r_cannot_fetch_register): Turn into...
(m32r_target::low_cannot_fetch_register): ...this.
(m32r_cannot_store_register): Turn into...
(m32r_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-m68k-low.cc (class m68k_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(m68k_cannot_fetch_register): Turn into...
(m68k_target::low_cannot_fetch_register): ...this.
(m68k_cannot_store_register): Turn into...
(m68k_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-mips-low.cc (class mips_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(mips_cannot_fetch_register): Turn into...
(mips_target::low_cannot_fetch_register): ...this.
(mips_cannot_store_register): Turn into...
(mips_target::low_cannot_store_register): ...this.
(get_usrregs_info): Inline at the call sites in
low_cannot_fetch_register and low_cannot_store_register,
and remove.
(the_low_target): Remove the op fields.
* linux-nios2-low.cc (class nios2_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(nios2_cannot_fetch_register): Turn into...
(nios2_target::low_cannot_fetch_register): ...this.
(nios2_cannot_store_register): Turn into...
(nios2_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-ppc-low.cc (class ppc_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(ppc_cannot_fetch_register): Turn into...
(ppc_target::low_cannot_fetch_register): ...this.
(ppc_cannot_store_register): Turn into...
(ppc_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-riscv-low.cc (class riscv_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(riscv_target::low_cannot_fetch_register)
(riscv_target::low_cannot_store_register): Define.
(the_low_target): Remove the op fields.
* linux-s390-low.cc (class s390_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(s390_cannot_fetch_register): Turn into...
(s390_target::low_cannot_fetch_register): ...this.
(s390_cannot_store_register): Turn into...
(s390_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-sh-low.cc (class sh_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(sh_cannot_fetch_register): Turn into...
(sh_target::low_cannot_fetch_register): ...this.
(sh_cannot_store_register): Turn into...
(sh_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-sparc-low.cc (class sparc_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(sparc_cannot_fetch_register): Turn into...
(sparc_target::low_cannot_fetch_register): ...this.
(sparc_cannot_store_register): Turn into...
(sparc_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-tic6x-low.cc (class tic6x_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(tic6x_cannot_fetch_register): Turn into...
(tic6x_target::low_cannot_fetch_register): ...this.
(tic6x_cannot_store_register): Turn into...
(tic6x_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-tile-low.cc (class tile_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(tile_cannot_fetch_register): Turn into...
(tile_target::low_cannot_fetch_register): ...this.
(tile_cannot_store_register): Turn into...
(tile_target::low_cannot_store_register): ...this.
(the_low_target): Remove the op fields.
* linux-xtensa-low.cc (class xtensa_target)
<low_cannot_fetch_register>
<low_cannot_store_register>: Declare.
(xtensa_target::low_cannot_fetch_register)
(xtensa_target::low_cannot_store_register): Define.
(the_low_target): Remove the op fields.
Diffstat (limited to 'gdbserver/linux-cris-low.cc')
-rw-r--r-- | gdbserver/linux-cris-low.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gdbserver/linux-cris-low.cc b/gdbserver/linux-cris-low.cc index dcb7d3f..03ca52e 100644 --- a/gdbserver/linux-cris-low.cc +++ b/gdbserver/linux-cris-low.cc @@ -31,6 +31,10 @@ public: protected: void low_arch_setup () override; + + bool low_cannot_fetch_register (int regno) override; + + bool low_cannot_store_register (int regno) override; }; /* The singleton target ops object. */ @@ -58,20 +62,20 @@ static int cris_regmap[] = { }; -static int -cris_cannot_store_register (int regno) +bool +cris_target::low_cannot_store_register (int regno) { if (cris_regmap[regno] == -1) - return 1; + return true; return (regno >= cris_num_regs); } -static int -cris_cannot_fetch_register (int regno) +bool +cris_target::low_cannot_fetch_register (int regno) { if (cris_regmap[regno] == -1) - return 1; + return true; return (regno >= cris_num_regs); } @@ -128,8 +132,6 @@ cris_target::get_regs_info () } struct linux_target_ops the_low_target = { - cris_cannot_fetch_register, - cris_cannot_store_register, NULL, /* fetch_register */ linux_get_pc_32bit, linux_set_pc_32bit, |