]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add target_ops argument to to_remove_watchpoint
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:29:17 +0000 (21:29 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:45:33 +0000 (07:45 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* target.h (struct target_ops) <to_remove_watchpoint>: Add
argument.
(target_remove_watchpoint): Add argument.
* target.c (debug_to_remove_watchpoint): Add argument.
(update_current_target): Update.
* s390-linux-nat.c (s390_remove_watchpoint): Add 'self' argument.
* remote.c (remote_remove_watchpoint): Add 'self' argument.
* remote-mips.c (mips_remove_watchpoint): Add 'self' argument.
* remote-m32r-sdi.c (m32r_remove_watchpoint): Add 'self' argument.
* procfs.c (procfs_remove_watchpoint): Add 'self' argument.
* ppc-linux-nat.c (ppc_linux_remove_watchpoint): Add 'self'
argument.
* nto-procfs.c (procfs_remove_hw_watchpoint): Add 'self' argument.
* mips-linux-nat.c (mips_linux_remove_watchpoint): Add 'self'
argument.
* inf-ttrace.c (inf_ttrace_remove_watchpoint): Add 'self'
argument.
* ia64-linux-nat.c (ia64_linux_remove_watchpoint): Add 'self'
argument.
* i386-nat.c (i386_remove_watchpoint): Add 'self' argument.
* arm-linux-nat.c (arm_linux_remove_watchpoint): Add 'self'
argument.
* aarch64-linux-nat.c (aarch64_linux_remove_watchpoint): Add
'self' argument.

16 files changed:
gdb/ChangeLog
gdb/aarch64-linux-nat.c
gdb/arm-linux-nat.c
gdb/i386-nat.c
gdb/ia64-linux-nat.c
gdb/inf-ttrace.c
gdb/mips-linux-nat.c
gdb/nto-procfs.c
gdb/ppc-linux-nat.c
gdb/procfs.c
gdb/remote-m32r-sdi.c
gdb/remote-mips.c
gdb/remote.c
gdb/s390-linux-nat.c
gdb/target.c
gdb/target.h

index fff135d012cfa442eb99841c910d9a4ab839ec71..38ddd87c47a33b0158f18f45e727eafffd3f5b6a 100644 (file)
@@ -1,3 +1,30 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target.h (struct target_ops) <to_remove_watchpoint>: Add
+       argument.
+       (target_remove_watchpoint): Add argument.
+       * target.c (debug_to_remove_watchpoint): Add argument.
+       (update_current_target): Update.
+       * s390-linux-nat.c (s390_remove_watchpoint): Add 'self' argument.
+       * remote.c (remote_remove_watchpoint): Add 'self' argument.
+       * remote-mips.c (mips_remove_watchpoint): Add 'self' argument.
+       * remote-m32r-sdi.c (m32r_remove_watchpoint): Add 'self' argument.
+       * procfs.c (procfs_remove_watchpoint): Add 'self' argument.
+       * ppc-linux-nat.c (ppc_linux_remove_watchpoint): Add 'self'
+       argument.
+       * nto-procfs.c (procfs_remove_hw_watchpoint): Add 'self' argument.
+       * mips-linux-nat.c (mips_linux_remove_watchpoint): Add 'self'
+       argument.
+       * inf-ttrace.c (inf_ttrace_remove_watchpoint): Add 'self'
+       argument.
+       * ia64-linux-nat.c (ia64_linux_remove_watchpoint): Add 'self'
+       argument.
+       * i386-nat.c (i386_remove_watchpoint): Add 'self' argument.
+       * arm-linux-nat.c (arm_linux_remove_watchpoint): Add 'self'
+       argument.
+       * aarch64-linux-nat.c (aarch64_linux_remove_watchpoint): Add
+       'self' argument.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target.h (struct target_ops) <to_remove_hw_breakpoint>: Add
index cec5e4ada04b6fa7c9001ad25fa304373f98c330..d5090314e2e3f72a75d9364a47f0d289f4ec6470 100644 (file)
@@ -1372,7 +1372,8 @@ aarch64_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
    type TYPE.  Return 0 on success, -1 on failure.  */
 
 static int
-aarch64_linux_remove_watchpoint (CORE_ADDR addr, int len, int type,
+aarch64_linux_remove_watchpoint (struct target_ops *self,
+                                CORE_ADDR addr, int len, int type,
                                 struct expression *cond)
 {
   int ret;
index 99699aba9b5f3a275e703485f9609fab1e239c8e..d964009391d939c602c63e5d8ad247a5a40262c9 100644 (file)
@@ -1126,7 +1126,8 @@ arm_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
 
 /* Remove a hardware breakpoint.  */
 static int
-arm_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
+arm_linux_remove_watchpoint (struct target_ops *self,
+                            CORE_ADDR addr, int len, int rw,
                             struct expression *cond)
 {
   struct lwp_info *lp;
index 80bb217599bf5378d2dd7b3025011f05e9dc3557..e1306702c968334875c497aa418e2ae173d66953 100644 (file)
@@ -627,7 +627,8 @@ i386_insert_watchpoint (CORE_ADDR addr, int len, int type,
    address ADDR, whose length is LEN bytes, and for accesses of the
    type TYPE.  Return 0 on success, -1 on failure.  */
 static int
-i386_remove_watchpoint (CORE_ADDR addr, int len, int type,
+i386_remove_watchpoint (struct target_ops *self,
+                       CORE_ADDR addr, int len, int type,
                        struct expression *cond)
 {
   struct i386_debug_reg_state *state
index 938807f88e81f1ae4b885d829f2fb2712985d19d..31ee479029ae664ffa88e452580ed83f297b7aea 100644 (file)
@@ -596,7 +596,8 @@ ia64_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
 }
 
 static int
-ia64_linux_remove_watchpoint (CORE_ADDR addr, int len, int type,
+ia64_linux_remove_watchpoint (struct target_ops *self,
+                             CORE_ADDR addr, int len, int type,
                              struct expression *cond)
 {
   int idx;
index 28b55eb269e3fabece9e8e62b1de22e15297be08..7e77424c97f1d928a65c127dabce5239e1ad4ee5 100644 (file)
@@ -338,7 +338,8 @@ inf_ttrace_insert_watchpoint (CORE_ADDR addr, int len, int type,
    type TYPE.  */
 
 static int
-inf_ttrace_remove_watchpoint (CORE_ADDR addr, int len, int type,
+inf_ttrace_remove_watchpoint (struct target_ops *self,
+                             CORE_ADDR addr, int len, int type,
                              struct expression *cond)
 {
   const int pagesize = inf_ttrace_page_dict.pagesize;
index a92078d2a58d5bf71c18e0df8c60f44a40a7e117..9c1c8cb4459ba579602e2013d532773b8b0a2f24 100644 (file)
@@ -698,7 +698,8 @@ mips_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
    Return zero on success.  */
 
 static int
-mips_linux_remove_watchpoint (CORE_ADDR addr, int len, int type,
+mips_linux_remove_watchpoint (struct target_ops *self,
+                             CORE_ADDR addr, int len, int type,
                              struct expression *cond)
 {
   int retval;
index 71c0526e8d0f21b3854d2eeb1b817a2e3ce641e4..7407efc63eb8912da80d5cdb004ddfde15c38c21 100644 (file)
@@ -73,7 +73,8 @@ static int procfs_can_use_hw_breakpoint (struct target_ops *self,
 static int procfs_insert_hw_watchpoint (CORE_ADDR addr, int len, int type,
                                        struct expression *cond);
 
-static int procfs_remove_hw_watchpoint (CORE_ADDR addr, int len, int type,
+static int procfs_remove_hw_watchpoint (struct target_ops *self,
+                                       CORE_ADDR addr, int len, int type,
                                        struct expression *cond);
 
 static int procfs_stopped_by_watchpoint (struct target_ops *ops);
@@ -1496,7 +1497,8 @@ procfs_can_use_hw_breakpoint (struct target_ops *self,
 }
 
 static int
-procfs_remove_hw_watchpoint (CORE_ADDR addr, int len, int type,
+procfs_remove_hw_watchpoint (struct target_ops *self,
+                            CORE_ADDR addr, int len, int type,
                             struct expression *cond)
 {
   return procfs_hw_watchpoint (addr, -1, type);
index eb0ccc6c7f36dff7e492945e2473a2c323dd36aa..b4eae9d7d3b35a610aa227af35ae27d12fea169b 100644 (file)
@@ -2144,7 +2144,8 @@ ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
 }
 
 static int
-ppc_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
+ppc_linux_remove_watchpoint (struct target_ops *self,
+                            CORE_ADDR addr, int len, int rw,
                             struct expression *cond)
 {
   struct lwp_info *lp;
index 5b54a42fd19c5bb8b3f9f82689d1159c55433b36..26e7ac3fea4a36dc0ebb1710a91be3b0d4dff5be 100644 (file)
@@ -4921,7 +4921,8 @@ procfs_insert_watchpoint (CORE_ADDR addr, int len, int type,
 }
 
 static int
-procfs_remove_watchpoint (CORE_ADDR addr, int len, int type,
+procfs_remove_watchpoint (struct target_ops *self,
+                         CORE_ADDR addr, int len, int type,
                          struct expression *cond)
 {
   return procfs_set_watchpoint (inferior_ptid, addr, 0, 0, 0);
index 4cd12d868924ae37bef68f1af498067312520f78..6d8eab0c053b981501f080b17a9ea8bdbacf8717 100644 (file)
@@ -1443,7 +1443,8 @@ m32r_insert_watchpoint (CORE_ADDR addr, int len, int type,
 }
 
 static int
-m32r_remove_watchpoint (CORE_ADDR addr, int len, int type,
+m32r_remove_watchpoint (struct target_ops *self,
+                       CORE_ADDR addr, int len, int type,
                        struct expression *cond)
 {
   int i;
index 2e2116c504652f465e8299b919855333d386193f..174e9b3e66dfe8800a59cb75602cd1a24ae883e2 100644 (file)
@@ -2438,7 +2438,8 @@ mips_insert_watchpoint (CORE_ADDR addr, int len, int type,
 /* Remove a watchpoint.  */
 
 static int
-mips_remove_watchpoint (CORE_ADDR addr, int len, int type,
+mips_remove_watchpoint (struct target_ops *self,
+                       CORE_ADDR addr, int len, int type,
                        struct expression *cond)
 {
   if (mips_clear_breakpoint (addr, len, type))
index a837882d87202b983fd1f559561ee15c23b68cd2..c797530cb7936a4bda27ce25eebeeb42791da295 100644 (file)
@@ -8215,7 +8215,8 @@ remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr,
 
 
 static int
-remote_remove_watchpoint (CORE_ADDR addr, int len, int type,
+remote_remove_watchpoint (struct target_ops *self,
+                         CORE_ADDR addr, int len, int type,
                          struct expression *cond)
 {
   struct remote_state *rs = get_remote_state ();
index ae00a513f7a5e46ae2b7438c86e81f365d2b2c45..8a187aca4428990d239e5cd114bf5a5371f568b2 100644 (file)
@@ -529,7 +529,8 @@ s390_insert_watchpoint (CORE_ADDR addr, int len, int type,
 }
 
 static int
-s390_remove_watchpoint (CORE_ADDR addr, int len, int type,
+s390_remove_watchpoint (struct target_ops *self,
+                       CORE_ADDR addr, int len, int type,
                        struct expression *cond)
 {
   struct lwp_info *lp;
index 95ad27e150ae906781394b142f16f8086d229d65..68504100ddd7d173203a39c9672f97f6b5f40a17 100644 (file)
@@ -114,7 +114,8 @@ static int debug_to_remove_hw_breakpoint (struct target_ops *self,
 static int debug_to_insert_watchpoint (CORE_ADDR, int, int,
                                       struct expression *);
 
-static int debug_to_remove_watchpoint (CORE_ADDR, int, int,
+static int debug_to_remove_watchpoint (struct target_ops *self,
+                                      CORE_ADDR, int, int,
                                       struct expression *);
 
 static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *);
@@ -751,7 +752,8 @@ update_current_target (void)
            (int (*) (CORE_ADDR, int, int, struct expression *))
            return_minus_one);
   de_fault (to_remove_watchpoint,
-           (int (*) (CORE_ADDR, int, int, struct expression *))
+           (int (*) (struct target_ops *, CORE_ADDR, int, int,
+                     struct expression *))
            return_minus_one);
   de_fault (to_watchpoint_addr_within_range,
            default_watchpoint_addr_within_range);
@@ -4767,12 +4769,14 @@ debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type,
 }
 
 static int
-debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type,
+debug_to_remove_watchpoint (struct target_ops *self,
+                           CORE_ADDR addr, int len, int type,
                            struct expression *cond)
 {
   int retval;
 
-  retval = debug_target.to_remove_watchpoint (addr, len, type, cond);
+  retval = debug_target.to_remove_watchpoint (&debug_target,
+                                             addr, len, type, cond);
 
   fprintf_unfiltered (gdb_stdlog,
                      "target_remove_watchpoint (%s, %d, %d, %s) = %ld\n",
index 7f94b2b4d6140a4211f26e93fda739113523cef3..defb78463a24f38b97f03eadb2b61a891b59c60b 100644 (file)
@@ -459,7 +459,8 @@ struct target_ops
 
     /* Documentation of what the two routines below are expected to do is
        provided with the corresponding target_* macros.  */
-    int (*to_remove_watchpoint) (CORE_ADDR, int, int, struct expression *);
+    int (*to_remove_watchpoint) (struct target_ops *,
+                                CORE_ADDR, int, int, struct expression *);
     int (*to_insert_watchpoint) (CORE_ADDR, int, int, struct expression *);
 
     int (*to_insert_mask_watchpoint) (struct target_ops *,
@@ -1617,7 +1618,8 @@ extern char *target_thread_name (struct thread_info *);
      (*current_target.to_insert_watchpoint) (addr, len, type, cond)
 
 #define        target_remove_watchpoint(addr, len, type, cond) \
-     (*current_target.to_remove_watchpoint) (addr, len, type, cond)
+     (*current_target.to_remove_watchpoint) (&current_target,  \
+                                            addr, len, type, cond)
 
 /* Insert a new masked watchpoint at ADDR using the mask MASK.
    RW may be hw_read for a read watchpoint, hw_write for a write watchpoint