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:
parent
23a267714b
commit
a64dc96c25
@ -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>
|
||||
|
||||
* target.h (struct target_ops) <to_insert_hw_breakpoint>: Add
|
||||
|
@ -1235,7 +1235,8 @@ aarch64_linux_insert_hw_breakpoint (struct target_ops *self,
|
||||
Return 0 on success, -1 on failure. */
|
||||
|
||||
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)
|
||||
{
|
||||
int ret;
|
||||
|
@ -1056,7 +1056,8 @@ arm_linux_insert_hw_breakpoint (struct target_ops *self,
|
||||
|
||||
/* Remove a hardware breakpoint. */
|
||||
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 lwp_info *lp;
|
||||
|
@ -791,7 +791,7 @@ i386_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
|
||||
Return 0 on success, -1 on failure. */
|
||||
|
||||
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 i386_debug_reg_state *state
|
||||
|
@ -1710,7 +1710,8 @@ ppc_linux_insert_hw_breakpoint (struct target_ops *self,
|
||||
}
|
||||
|
||||
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 lwp_info *lp;
|
||||
|
@ -8385,7 +8385,7 @@ remote_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
|
12
gdb/target.c
12
gdb/target.c
@ -107,7 +107,8 @@ static int debug_to_insert_hw_breakpoint (struct target_ops *self,
|
||||
struct gdbarch *,
|
||||
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 *);
|
||||
|
||||
static int debug_to_insert_watchpoint (CORE_ADDR, int, int,
|
||||
@ -743,7 +744,8 @@ update_current_target (void)
|
||||
struct bp_target_info *))
|
||||
return_minus_one);
|
||||
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);
|
||||
de_fault (to_insert_watchpoint,
|
||||
(int (*) (CORE_ADDR, int, int, struct expression *))
|
||||
@ -4733,12 +4735,14 @@ debug_to_insert_hw_breakpoint (struct target_ops *self,
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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,
|
||||
"target_remove_hw_breakpoint (%s, xxx) = %ld\n",
|
||||
|
@ -454,7 +454,8 @@ struct target_ops
|
||||
int (*to_ranged_break_num_registers) (struct target_ops *);
|
||||
int (*to_insert_hw_breakpoint) (struct target_ops *,
|
||||
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
|
||||
provided with the corresponding target_* macros. */
|
||||
@ -1642,7 +1643,8 @@ extern int target_remove_mask_watchpoint (CORE_ADDR, CORE_ADDR, int);
|
||||
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) (¤t_target, \
|
||||
gdbarch, bp_tgt)
|
||||
|
||||
/* Return number of debug registers needed for a ranged breakpoint,
|
||||
or -1 if ranged breakpoints are not supported. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user