Add target_ops argument to to_insert_hw_breakpoint
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_insert_hw_breakpoint>: Add argument. (target_insert_hw_breakpoint): Add argument. * target.c (debug_to_insert_hw_breakpoint): Add argument. (update_current_target): Update. * remote.c (remote_insert_hw_breakpoint): Add 'self' argument. * ppc-linux-nat.c (ppc_linux_insert_hw_breakpoint): Add 'self' argument. * nto-procfs.c (procfs_insert_hw_breakpoint): Add 'self' argument. * i386-nat.c (i386_insert_hw_breakpoint): Add 'self' argument. * arm-linux-nat.c (arm_linux_insert_hw_breakpoint): Add 'self' argument. * aarch64-linux-nat.c (aarch64_linux_insert_hw_breakpoint): Add 'self' argument.
This commit is contained in:
parent
5461485a87
commit
23a267714b
@ -1,3 +1,20 @@
|
||||
2014-02-19 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* target.h (struct target_ops) <to_insert_hw_breakpoint>: Add
|
||||
argument.
|
||||
(target_insert_hw_breakpoint): Add argument.
|
||||
* target.c (debug_to_insert_hw_breakpoint): Add argument.
|
||||
(update_current_target): Update.
|
||||
* remote.c (remote_insert_hw_breakpoint): Add 'self' argument.
|
||||
* ppc-linux-nat.c (ppc_linux_insert_hw_breakpoint): Add 'self'
|
||||
argument.
|
||||
* nto-procfs.c (procfs_insert_hw_breakpoint): Add 'self' argument.
|
||||
* i386-nat.c (i386_insert_hw_breakpoint): Add 'self' argument.
|
||||
* arm-linux-nat.c (arm_linux_insert_hw_breakpoint): Add 'self'
|
||||
argument.
|
||||
* aarch64-linux-nat.c (aarch64_linux_insert_hw_breakpoint): Add
|
||||
'self' argument.
|
||||
|
||||
2014-02-19 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* target.h (struct target_ops) <to_can_use_hw_breakpoint>: Add
|
||||
|
@ -1202,7 +1202,8 @@ aarch64_handle_breakpoint (int type, CORE_ADDR addr, int len, int is_insert)
|
||||
Return 0 on success, -1 on failure. */
|
||||
|
||||
static int
|
||||
aarch64_linux_insert_hw_breakpoint (struct gdbarch *gdbarch,
|
||||
aarch64_linux_insert_hw_breakpoint (struct target_ops *self,
|
||||
struct gdbarch *gdbarch,
|
||||
struct bp_target_info *bp_tgt)
|
||||
{
|
||||
int ret;
|
||||
|
@ -1037,7 +1037,8 @@ arm_linux_remove_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt,
|
||||
|
||||
/* Insert a Hardware breakpoint. */
|
||||
static int
|
||||
arm_linux_insert_hw_breakpoint (struct gdbarch *gdbarch,
|
||||
arm_linux_insert_hw_breakpoint (struct target_ops *self,
|
||||
struct gdbarch *gdbarch,
|
||||
struct bp_target_info *bp_tgt)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
|
@ -765,7 +765,7 @@ i386_stopped_by_watchpoint (struct target_ops *ops)
|
||||
/* Insert a hardware-assisted breakpoint at BP_TGT->placed_address.
|
||||
Return 0 on success, EBUSY on failure. */
|
||||
static int
|
||||
i386_insert_hw_breakpoint (struct gdbarch *gdbarch,
|
||||
i386_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
|
||||
struct bp_target_info *bp_tgt)
|
||||
{
|
||||
struct i386_debug_reg_state *state
|
||||
|
@ -937,7 +937,7 @@ procfs_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch,
|
||||
}
|
||||
|
||||
static int
|
||||
procfs_insert_hw_breakpoint (struct gdbarch *gdbarch,
|
||||
procfs_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
|
||||
struct bp_target_info *bp_tgt)
|
||||
{
|
||||
return procfs_breakpoint (bp_tgt->placed_address,
|
||||
|
@ -1673,7 +1673,8 @@ ppc_linux_ranged_break_num_registers (struct target_ops *target)
|
||||
success, 1 if hardware breakpoints are not supported or -1 for failure. */
|
||||
|
||||
static int
|
||||
ppc_linux_insert_hw_breakpoint (struct gdbarch *gdbarch,
|
||||
ppc_linux_insert_hw_breakpoint (struct target_ops *self,
|
||||
struct gdbarch *gdbarch,
|
||||
struct bp_target_info *bp_tgt)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
|
@ -8321,7 +8321,7 @@ remote_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
|
||||
|
||||
|
||||
static int
|
||||
remote_insert_hw_breakpoint (struct gdbarch *gdbarch,
|
||||
remote_insert_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
@ -103,7 +103,8 @@ static int debug_to_remove_breakpoint (struct target_ops *, struct gdbarch *,
|
||||
static int debug_to_can_use_hw_breakpoint (struct target_ops *self,
|
||||
int, int, int);
|
||||
|
||||
static int debug_to_insert_hw_breakpoint (struct gdbarch *,
|
||||
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 *,
|
||||
@ -738,7 +739,8 @@ update_current_target (void)
|
||||
(int (*) (struct target_ops *, int, int, int))
|
||||
return_zero);
|
||||
de_fault (to_insert_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_remove_hw_breakpoint,
|
||||
(int (*) (struct gdbarch *, struct bp_target_info *))
|
||||
@ -4714,12 +4716,14 @@ debug_to_watchpoint_addr_within_range (struct target_ops *target,
|
||||
}
|
||||
|
||||
static int
|
||||
debug_to_insert_hw_breakpoint (struct gdbarch *gdbarch,
|
||||
debug_to_insert_hw_breakpoint (struct target_ops *self,
|
||||
struct gdbarch *gdbarch,
|
||||
struct bp_target_info *bp_tgt)
|
||||
{
|
||||
int retval;
|
||||
|
||||
retval = debug_target.to_insert_hw_breakpoint (gdbarch, bp_tgt);
|
||||
retval = debug_target.to_insert_hw_breakpoint (&debug_target,
|
||||
gdbarch, bp_tgt);
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"target_insert_hw_breakpoint (%s, xxx) = %ld\n",
|
||||
|
@ -452,7 +452,8 @@ struct target_ops
|
||||
TARGET_DEFAULT_FUNC (memory_remove_breakpoint);
|
||||
int (*to_can_use_hw_breakpoint) (struct target_ops *, int, int, int);
|
||||
int (*to_ranged_break_num_registers) (struct target_ops *);
|
||||
int (*to_insert_hw_breakpoint) (struct gdbarch *, struct bp_target_info *);
|
||||
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 *);
|
||||
|
||||
/* Documentation of what the two routines below are expected to do is
|
||||
@ -1637,7 +1638,8 @@ extern int target_remove_mask_watchpoint (CORE_ADDR, CORE_ADDR, int);
|
||||
message) otherwise. */
|
||||
|
||||
#define target_insert_hw_breakpoint(gdbarch, bp_tgt) \
|
||||
(*current_target.to_insert_hw_breakpoint) (gdbarch, bp_tgt)
|
||||
(*current_target.to_insert_hw_breakpoint) (¤t_target, \
|
||||
gdbarch, bp_tgt)
|
||||
|
||||
#define target_remove_hw_breakpoint(gdbarch, bp_tgt) \
|
||||
(*current_target.to_remove_hw_breakpoint) (gdbarch, bp_tgt)
|
||||
|
Loading…
x
Reference in New Issue
Block a user