From 9db9aa232ac37e4dca92733678748adc1bfc7ef0 Mon Sep 17 00:00:00 2001 From: Tankut Baris Aktemur Date: Thu, 2 Apr 2020 15:11:27 +0200 Subject: gdbserver/linux-low: turn 'insert_point' and 'remove_point' into methods gdbserver/ChangeLog: 2020-04-02 Tankut Baris Aktemur Turn the 'insert_point' and 'remove_point' linux target ops into methods of linux_process_target. * linux-low.h (struct linux_target_ops): Remove the ops. (class linux_process_target) : Declare. * linux-low.cc (linux_process_target::low_insert_point) (linux_process_target::low_remove_point): Define. (linux_process_target::insert_point) (linux_process_target::remove_point): Update for calls to low_insert_point and low_remove_point. * linux-x86-low.cc (class x86_target) : Declare. (x86_insert_point): Turn into... (x86_target::low_insert_point): ...this. (x86_remove_point): Turn into... (x86_target::low_remove_point): ...this. (the_low_target): Remove the op fields. * linux-aarch64-low.cc (class aarch64_target) : Declare. (aarch64_insert_point): Turn into... (aarch64_target::low_insert_point): ...this. (aarch64_remove_point): Turn into... (aarch64_target::low_remove_point): ...this. (the_low_target): Remove the op fields. * linux-arm-low.cc (class arm_target) : Declare. (arm_insert_point): Turn into... (arm_target::low_insert_point): ...this. (arm_remove_point): Turn into... (arm_target::low_remove_point): ...this. (the_low_target): Remove the op fields. * linux-crisv32-low.cc (class crisv32_target) : Declare. (crisv32_insert_point): Turn into... (crisv32_target::low_insert_point): ...this. (crisv32_remove_point): Turn into... (crisv32_target::low_remove_point): ...this. (the_low_target): Remove the op fields. * linux-mips-low.cc (class mips_target) : Declare. (mips_insert_point): Turn into... (mips_target::low_insert_point): ...this. (mips_remove_point): Turn into... (mips_target::low_remove_point): ...this. (the_low_target): Remove the op fields. * linux-ppc-low.cc (class ppc_target) : Declare. (ppc_insert_point): Turn into... (ppc_target::low_insert_point): ...this. (ppc_remove_point): Turn into... (ppc_target::low_remove_point): ...this. (the_low_target): Remove the op fields. * linux-bfin-low.cc (the_low_target): Remove the op fields. * linux-m32r-low.cc (the_low_target): Ditto. * linux-m68k-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. --- gdbserver/linux-low.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'gdbserver/linux-low.h') diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h index c80237c..0fdd8ce 100644 --- a/gdbserver/linux-low.h +++ b/gdbserver/linux-low.h @@ -131,13 +131,6 @@ struct lwp_info; struct linux_target_ops { - /* Breakpoint and watchpoint related functions. See target.h for - comments. */ - int (*insert_point) (enum raw_bkpt_type type, CORE_ADDR addr, - int size, struct raw_breakpoint *bp); - int (*remove_point) (enum raw_bkpt_type type, CORE_ADDR addr, - int size, struct raw_breakpoint *bp); - int (*stopped_by_watchpoint) (void); CORE_ADDR (*stopped_data_address) (void); @@ -664,6 +657,14 @@ protected: /* Return true if there is a breakpoint at PC. */ virtual bool low_breakpoint_at (CORE_ADDR pc) = 0; + /* Breakpoint and watchpoint related functions. See target.h for + comments. */ + virtual int low_insert_point (raw_bkpt_type type, CORE_ADDR addr, + int size, raw_breakpoint *bp); + + virtual int low_remove_point (raw_bkpt_type type, CORE_ADDR addr, + int size, raw_breakpoint *bp); + /* How many bytes the PC should be decremented after a break. */ virtual int low_decr_pc_after_break (); }; -- cgit v1.1