+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
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;
/* 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;
/* 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
}
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,
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;
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;
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 *,
(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 *))
}
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",
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
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)