]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add target_ops argument to to_insert_hw_breakpoint
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:28:50 +0000 (21:28 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:45:31 +0000 (07:45 -0700)
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.

gdb/ChangeLog
gdb/aarch64-linux-nat.c
gdb/arm-linux-nat.c
gdb/i386-nat.c
gdb/nto-procfs.c
gdb/ppc-linux-nat.c
gdb/remote.c
gdb/target.c
gdb/target.h

index e145c33c72123a157c4d5548aa4e13b627b6afdb..db4e949bf17c8ac12b39822adba57c48a3080757 100644 (file)
@@ -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
index c9a3b4de09d77eab225fb325309026564b576478..9a4aba969a6bbd3e4a6975dc2da3e17fec6640a3 100644 (file)
@@ -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;
index a1a9cc58fe4b72e9d0fe68ceb1a57489a38b6cd7..00b22cc54425954f228703df031ff164e3e79558 100644 (file)
@@ -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;
index bae701a6627f9d904f9a7d3c060e074ebc9a6f5f..21ef95ce2c8581481f5aa0cfe24e8683810cfbf0 100644 (file)
@@ -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
index 4914336c49cacc22a38b9f013be1dd68cd9e4426..71c0526e8d0f21b3854d2eeb1b817a2e3ce641e4 100644 (file)
@@ -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,
index c29efdaa413894249de475b899226ec92c4f1120..6213b746e681028c875955fd5d4e10be8799cd98 100644 (file)
@@ -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;
index 0677fa4c95b2b4599db5f0da11ed7f3a0da5fa65..8581d26fced8af27ea10ae81979c14f1d105315a 100644 (file)
@@ -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;
index 53f3783339d771ac53e0b72607ff86aa76d70b48..08866b9d79dec1a4f3bc4b3824f74b0d4a0c9087 100644 (file)
@@ -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",
index e2002861fc473cbb4d0540d315dcabd040911c69..6fc7294b0e48bae69f40da625181c8c048c74d7a 100644 (file)
@@ -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) (&current_target,       \
+                                               gdbarch, bp_tgt)
 
 #define target_remove_hw_breakpoint(gdbarch, bp_tgt) \
      (*current_target.to_remove_hw_breakpoint) (gdbarch, bp_tgt)