Add target_ops argument to to_remove_hw_breakpoint

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_remove_hw_breakpoint>: Add
	argument.
	(target_remove_hw_breakpoint): Add argument.
	* target.c (debug_to_remove_hw_breakpoint): Add argument.
	(update_current_target): Update.
	* remote.c (remote_remove_hw_breakpoint): Add 'self' argument.
	* ppc-linux-nat.c (ppc_linux_remove_hw_breakpoint): Add 'self'
	argument.
	* i386-nat.c (i386_remove_hw_breakpoint): Add 'self' argument.
	* arm-linux-nat.c (arm_linux_remove_hw_breakpoint): Add 'self'
	argument.
	* aarch64-linux-nat.c (aarch64_linux_remove_hw_breakpoint): Add
	'self' argument.
This commit is contained in:
Tom Tromey 2013-12-17 21:29:03 -07:00
parent 23a267714b
commit a64dc96c25
8 changed files with 36 additions and 11 deletions

View file

@ -1,3 +1,19 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_remove_hw_breakpoint>: Add
argument.
(target_remove_hw_breakpoint): Add argument.
* target.c (debug_to_remove_hw_breakpoint): Add argument.
(update_current_target): Update.
* remote.c (remote_remove_hw_breakpoint): Add 'self' argument.
* ppc-linux-nat.c (ppc_linux_remove_hw_breakpoint): Add 'self'
argument.
* i386-nat.c (i386_remove_hw_breakpoint): Add 'self' argument.
* arm-linux-nat.c (arm_linux_remove_hw_breakpoint): Add 'self'
argument.
* aarch64-linux-nat.c (aarch64_linux_remove_hw_breakpoint): Add
'self' argument.
2014-02-19 Tom Tromey <tromey@redhat.com> 2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_insert_hw_breakpoint>: Add * target.h (struct target_ops) <to_insert_hw_breakpoint>: Add

View file

@ -1235,7 +1235,8 @@ aarch64_linux_insert_hw_breakpoint (struct target_ops *self,
Return 0 on success, -1 on failure. */ Return 0 on success, -1 on failure. */
static int static int
aarch64_linux_remove_hw_breakpoint (struct gdbarch *gdbarch, aarch64_linux_remove_hw_breakpoint (struct target_ops *self,
struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt) struct bp_target_info *bp_tgt)
{ {
int ret; int ret;

View file

@ -1056,7 +1056,8 @@ arm_linux_insert_hw_breakpoint (struct target_ops *self,
/* Remove a hardware breakpoint. */ /* Remove a hardware breakpoint. */
static int static int
arm_linux_remove_hw_breakpoint (struct gdbarch *gdbarch, arm_linux_remove_hw_breakpoint (struct target_ops *self,
struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt) struct bp_target_info *bp_tgt)
{ {
struct lwp_info *lp; struct lwp_info *lp;

View file

@ -791,7 +791,7 @@ i386_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
Return 0 on success, -1 on failure. */ Return 0 on success, -1 on failure. */
static int static int
i386_remove_hw_breakpoint (struct gdbarch *gdbarch, i386_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt) struct bp_target_info *bp_tgt)
{ {
struct i386_debug_reg_state *state struct i386_debug_reg_state *state

View file

@ -1710,7 +1710,8 @@ ppc_linux_insert_hw_breakpoint (struct target_ops *self,
} }
static int static int
ppc_linux_remove_hw_breakpoint (struct gdbarch *gdbarch, ppc_linux_remove_hw_breakpoint (struct target_ops *self,
struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt) struct bp_target_info *bp_tgt)
{ {
struct lwp_info *lp; struct lwp_info *lp;

View file

@ -8385,7 +8385,7 @@ remote_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
static int static int
remote_remove_hw_breakpoint (struct gdbarch *gdbarch, remote_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt) struct bp_target_info *bp_tgt)
{ {
CORE_ADDR addr; CORE_ADDR addr;

View file

@ -107,7 +107,8 @@ static int debug_to_insert_hw_breakpoint (struct target_ops *self,
struct gdbarch *, struct gdbarch *,
struct bp_target_info *); struct bp_target_info *);
static int debug_to_remove_hw_breakpoint (struct gdbarch *, static int debug_to_remove_hw_breakpoint (struct target_ops *self,
struct gdbarch *,
struct bp_target_info *); struct bp_target_info *);
static int debug_to_insert_watchpoint (CORE_ADDR, int, int, static int debug_to_insert_watchpoint (CORE_ADDR, int, int,
@ -743,7 +744,8 @@ update_current_target (void)
struct bp_target_info *)) struct bp_target_info *))
return_minus_one); return_minus_one);
de_fault (to_remove_hw_breakpoint, de_fault (to_remove_hw_breakpoint,
(int (*) (struct gdbarch *, struct bp_target_info *)) (int (*) (struct target_ops *, struct gdbarch *,
struct bp_target_info *))
return_minus_one); return_minus_one);
de_fault (to_insert_watchpoint, de_fault (to_insert_watchpoint,
(int (*) (CORE_ADDR, int, int, struct expression *)) (int (*) (CORE_ADDR, int, int, struct expression *))
@ -4733,12 +4735,14 @@ debug_to_insert_hw_breakpoint (struct target_ops *self,
} }
static int static int
debug_to_remove_hw_breakpoint (struct gdbarch *gdbarch, debug_to_remove_hw_breakpoint (struct target_ops *self,
struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt) struct bp_target_info *bp_tgt)
{ {
int retval; int retval;
retval = debug_target.to_remove_hw_breakpoint (gdbarch, bp_tgt); retval = debug_target.to_remove_hw_breakpoint (&debug_target,
gdbarch, bp_tgt);
fprintf_unfiltered (gdb_stdlog, fprintf_unfiltered (gdb_stdlog,
"target_remove_hw_breakpoint (%s, xxx) = %ld\n", "target_remove_hw_breakpoint (%s, xxx) = %ld\n",

View file

@ -454,7 +454,8 @@ struct target_ops
int (*to_ranged_break_num_registers) (struct target_ops *); int (*to_ranged_break_num_registers) (struct target_ops *);
int (*to_insert_hw_breakpoint) (struct target_ops *, int (*to_insert_hw_breakpoint) (struct target_ops *,
struct gdbarch *, struct bp_target_info *); struct gdbarch *, struct bp_target_info *);
int (*to_remove_hw_breakpoint) (struct gdbarch *, struct bp_target_info *); int (*to_remove_hw_breakpoint) (struct target_ops *,
struct gdbarch *, struct bp_target_info *);
/* Documentation of what the two routines below are expected to do is /* Documentation of what the two routines below are expected to do is
provided with the corresponding target_* macros. */ provided with the corresponding target_* macros. */
@ -1642,7 +1643,8 @@ extern int target_remove_mask_watchpoint (CORE_ADDR, CORE_ADDR, int);
gdbarch, bp_tgt) gdbarch, bp_tgt)
#define target_remove_hw_breakpoint(gdbarch, bp_tgt) \ #define target_remove_hw_breakpoint(gdbarch, bp_tgt) \
(*current_target.to_remove_hw_breakpoint) (gdbarch, bp_tgt) (*current_target.to_remove_hw_breakpoint) (&current_target, \
gdbarch, bp_tgt)
/* Return number of debug registers needed for a ranged breakpoint, /* Return number of debug registers needed for a ranged breakpoint,
or -1 if ranged breakpoints are not supported. */ or -1 if ranged breakpoints are not supported. */