diff options
author | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-04-02 15:11:25 +0200 |
---|---|---|
committer | Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> | 2020-04-02 15:11:25 +0200 |
commit | 06250e4e67c0f40a00526afac642b4c345b56750 (patch) | |
tree | 4c50e4701772ddde8b219dbfd272e2ba9131f414 /gdbserver/linux-aarch64-low.cc | |
parent | bf9ae9d8c37a4e1dfd192f266c20ea5786fd1bbd (diff) | |
download | gdb-06250e4e67c0f40a00526afac642b4c345b56750.zip gdb-06250e4e67c0f40a00526afac642b4c345b56750.tar.gz gdb-06250e4e67c0f40a00526afac642b4c345b56750.tar.bz2 |
gdbserver/linux-low: turn 'breakpoint_kind_from_{pc, current_state}' into methods
gdbserver/ChangeLog:
2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Remove the 'breakpoint_kind_from_pc' and
'breakpoint_kind_from_current_state' linux target ops, and let the
concrete linux target define them by overriding the ops of
process_stratum_target.
* linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
Remove.
(linux_process_target::breakpoint_kind_from_current_state): Remove.
* linux-low.h (struct linux_target_ops): Remove ops.
(class linux_process_target) <breakpoint_kind_from_pc>: Remove.
<breakpoint_kind_from_current_state>: Remove.
* linux-x86-low.cc (the_low_target): Remove the op fields.
* linux-bfin-low.cc (the_low_target): Ditto.
* linux-cris-low.cc (the_low_target): Ditto.
* linux-crisv32-low.cc (the_low_target): Ditto.
* linux-m32r-low.cc (the_low_target): Ditto.
* linux-m68k-low.cc (the_low_target): Ditto.
* linux-mips-low.cc (the_low_target): Ditto.
* linux-nios2-low.cc (the_low_target): Ditto.
* linux-ppc-low.cc (the_low_target): Ditto.
* linux-s390-low.cc (the_low_target): Ditto.
* linux-sh-low.cc (the_low_target): Ditto.
* linux-sparc-low.cc (the_low_target): Ditto.
* linux-tic6x-low.cc (the_low_target): Ditto.
* linux-tile-low.cc (the_low_target): Ditto.
* linux-xtensa-low.cc (the_low_target): Ditto.
* linux-aarch64-low.cc (class aarch64_target)
<breakpoint_kind_from_pc>
<breakpoint_kind_from_current_state>: Declare.
(aarch64_breakpoint_kind_from_pc): Turn into...
(aarch64_target::breakpoint_kind_from_pc): ...this.
(aarch64_breakpoint_kind_from_current_state): Turn into...
(aarch64_target::breakpoint_kind_from_current_state): ...this.
(the_low_target): Remove the op fields.
* linux-arm-low.cc (class arm_target):
<breakpoint_kind_from_pc>
<breakpoint_kind_from_current_state>: Declare.
(arm_target::breakpoint_kind_from_pc): Define.
(arm_target::breakpoint_kind_from_current_state): Define.
(the_low_target): Remove the op fields.
* linux-riscv-low.cc (class riscv_target):
<breakpoint_kind_from_pc>: Declare.
(riscv_breakpoint_kind_from_pc): Turn into...
(riscv_target::breakpoint_kind_from_pc): ...this.
(the_low_target): Remove the op fields.
Diffstat (limited to 'gdbserver/linux-aarch64-low.cc')
-rw-r--r-- | gdbserver/linux-aarch64-low.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc index 6bed620..c9c9b30 100644 --- a/gdbserver/linux-aarch64-low.cc +++ b/gdbserver/linux-aarch64-low.cc @@ -57,6 +57,10 @@ public: const regs_info *get_regs_info () override; + int breakpoint_kind_from_pc (CORE_ADDR *pcptr) override; + + int breakpoint_kind_from_current_state (CORE_ADDR *pcptr) override; + protected: void low_arch_setup () override; @@ -3064,10 +3068,10 @@ aarch64_sw_breakpoint_from_kind (int kind, int *size) return arm_sw_breakpoint_from_kind (kind, size); } -/* Implementation of linux_target_ops method "breakpoint_kind_from_pc". */ +/* Implementation of target ops method "breakpoint_kind_from_pc". */ -static int -aarch64_breakpoint_kind_from_pc (CORE_ADDR *pcptr) +int +aarch64_target::breakpoint_kind_from_pc (CORE_ADDR *pcptr) { if (is_64bit_tdesc ()) return aarch64_breakpoint_len; @@ -3075,11 +3079,11 @@ aarch64_breakpoint_kind_from_pc (CORE_ADDR *pcptr) return arm_breakpoint_kind_from_pc (pcptr); } -/* Implementation of the linux_target_ops method +/* Implementation of the target ops method "breakpoint_kind_from_current_state". */ -static int -aarch64_breakpoint_kind_from_current_state (CORE_ADDR *pcptr) +int +aarch64_target::breakpoint_kind_from_current_state (CORE_ADDR *pcptr) { if (is_64bit_tdesc ()) return aarch64_breakpoint_len; @@ -3097,7 +3101,6 @@ aarch64_supports_hardware_single_step (void) struct linux_target_ops the_low_target = { - aarch64_breakpoint_kind_from_pc, aarch64_sw_breakpoint_from_kind, NULL, /* get_next_pcs */ 0, /* decr_pc_after_break */ @@ -3123,7 +3126,6 @@ struct linux_target_ops the_low_target = aarch64_emit_ops, aarch64_get_min_fast_tracepoint_insn_len, aarch64_supports_range_stepping, - aarch64_breakpoint_kind_from_current_state, aarch64_supports_hardware_single_step, aarch64_get_syscall_trapinfo, }; |