Add target_ops argument to to_insert_watchpoint
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:29:31 +0000 (21:29 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:45:34 +0000 (07:45 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* target.h (struct target_ops) <to_insert_watchpoint>: Add
argument.
(target_insert_watchpoint): Add argument.
* target.c (debug_to_insert_watchpoint): Add argument.
(update_current_target): Update.
* s390-linux-nat.c (s390_insert_watchpoint): Add 'self' argument.
* remote.c (remote_insert_watchpoint): Add 'self' argument.
* remote-mips.c (mips_insert_watchpoint): Add 'self' argument.
* remote-m32r-sdi.c (m32r_insert_watchpoint): Add 'self' argument.
* procfs.c (procfs_insert_watchpoint): Add 'self' argument.
* ppc-linux-nat.c (ppc_linux_insert_watchpoint): Add 'self'
argument.
* nto-procfs.c (procfs_insert_hw_watchpoint): Add 'self' argument.
(procfs_insert_hw_watchpoint): Add 'self' argument.
* mips-linux-nat.c (mips_linux_insert_watchpoint): Add 'self'
argument.
* inf-ttrace.c (inf_ttrace_insert_watchpoint): Add 'self'
argument.
* ia64-linux-nat.c (ia64_linux_insert_watchpoint): Add 'self'
argument.
* i386-nat.c (i386_insert_watchpoint): Add 'self' argument.
* arm-linux-nat.c (arm_linux_insert_watchpoint): Add 'self'
argument.
* aarch64-linux-nat.c (aarch64_linux_insert_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 38ddd87c47a33b0158f18f45e727eafffd3f5b6a..ac6184b68cbdccb960b14131ec8226172db1dbd9 100644 (file)
@@ -1,3 +1,31 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target.h (struct target_ops) <to_insert_watchpoint>: Add
+       argument.
+       (target_insert_watchpoint): Add argument.
+       * target.c (debug_to_insert_watchpoint): Add argument.
+       (update_current_target): Update.
+       * s390-linux-nat.c (s390_insert_watchpoint): Add 'self' argument.
+       * remote.c (remote_insert_watchpoint): Add 'self' argument.
+       * remote-mips.c (mips_insert_watchpoint): Add 'self' argument.
+       * remote-m32r-sdi.c (m32r_insert_watchpoint): Add 'self' argument.
+       * procfs.c (procfs_insert_watchpoint): Add 'self' argument.
+       * ppc-linux-nat.c (ppc_linux_insert_watchpoint): Add 'self'
+       argument.
+       * nto-procfs.c (procfs_insert_hw_watchpoint): Add 'self' argument.
+       (procfs_insert_hw_watchpoint): Add 'self' argument.
+       * mips-linux-nat.c (mips_linux_insert_watchpoint): Add 'self'
+       argument.
+       * inf-ttrace.c (inf_ttrace_insert_watchpoint): Add 'self'
+       argument.
+       * ia64-linux-nat.c (ia64_linux_insert_watchpoint): Add 'self'
+       argument.
+       * i386-nat.c (i386_insert_watchpoint): Add 'self' argument.
+       * arm-linux-nat.c (arm_linux_insert_watchpoint): Add 'self'
+       argument.
+       * aarch64-linux-nat.c (aarch64_linux_insert_watchpoint): Add
+       'self' argument.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target.h (struct target_ops) <to_remove_watchpoint>: Add
index d5090314e2e3f72a75d9364a47f0d289f4ec6470..a69e31fd1045fcc4eaba9343e20decc5fc1ac4fb 100644 (file)
@@ -1340,7 +1340,8 @@ aarch64_handle_watchpoint (int type, CORE_ADDR addr, int len, int is_insert)
    of the type TYPE.  Return 0 on success, -1 on failure.  */
 
 static int
-aarch64_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
+aarch64_linux_insert_watchpoint (struct target_ops *self,
+                                CORE_ADDR addr, int len, int type,
                                 struct expression *cond)
 {
   int ret;
index d964009391d939c602c63e5d8ad247a5a40262c9..c4b34cdf375de97c4b3396c2f66b81ad08faec78 100644 (file)
@@ -1108,7 +1108,8 @@ arm_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
 
 /* Insert a Hardware breakpoint.  */
 static int
-arm_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
+arm_linux_insert_watchpoint (struct target_ops *self,
+                            CORE_ADDR addr, int len, int rw,
                             struct expression *cond)
 {
   struct lwp_info *lp;
index e1306702c968334875c497aa418e2ae173d66953..cd766cf13229f33f615009100748bfc49df6bedd 100644 (file)
@@ -589,7 +589,8 @@ i386_update_inferior_debug_regs (struct i386_debug_reg_state *new_state)
    of the type TYPE.  Return 0 on success, -1 on failure.  */
 
 static int
-i386_insert_watchpoint (CORE_ADDR addr, int len, int type,
+i386_insert_watchpoint (struct target_ops *self,
+                       CORE_ADDR addr, int len, int type,
                        struct expression *cond)
 {
   struct i386_debug_reg_state *state
index 31ee479029ae664ffa88e452580ed83f297b7aea..ccd55b296737c03045f1870b1fb7533b1e652083 100644 (file)
@@ -542,7 +542,8 @@ is_power_of_2 (int val)
 }
 
 static int
-ia64_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
+ia64_linux_insert_watchpoint (struct target_ops *self,
+                             CORE_ADDR addr, int len, int rw,
                              struct expression *cond)
 {
   struct lwp_info *lp;
index 7e77424c97f1d928a65c127dabce5239e1ad4ee5..919515f7fbcf6ead0d662b5963c97bf54ba688ea 100644 (file)
@@ -314,7 +314,8 @@ inf_ttrace_disable_page_protections (pid_t pid)
    type TYPE.  */
 
 static int
-inf_ttrace_insert_watchpoint (CORE_ADDR addr, int len, int type,
+inf_ttrace_insert_watchpoint (struct target_ops *self,
+                             CORE_ADDR addr, int len, int type,
                              struct expression *cond)
 {
   const int pagesize = inf_ttrace_page_dict.pagesize;
index 9c1c8cb4459ba579602e2013d532773b8b0a2f24..d8781fc6543bdeaa0c9872e2a6b0a84fd8c7a946 100644 (file)
@@ -645,7 +645,8 @@ mips_linux_new_thread (struct lwp_info *lp)
    watch.  Return zero on success.  */
 
 static int
-mips_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
+mips_linux_insert_watchpoint (struct target_ops *self,
+                             CORE_ADDR addr, int len, int type,
                              struct expression *cond)
 {
   struct pt_watch_regs regs;
index 7407efc63eb8912da80d5cdb004ddfde15c38c21..0a7ed55f75261cc2d113b719de23d69130018117 100644 (file)
@@ -70,7 +70,8 @@ static ptid_t do_attach (ptid_t ptid);
 static int procfs_can_use_hw_breakpoint (struct target_ops *self,
                                         int, int, int);
 
-static int procfs_insert_hw_watchpoint (CORE_ADDR addr, int len, int type,
+static int procfs_insert_hw_watchpoint (struct target_ops *self,
+                                       CORE_ADDR addr, int len, int type,
                                        struct expression *cond);
 
 static int procfs_remove_hw_watchpoint (struct target_ops *self,
@@ -1505,7 +1506,8 @@ procfs_remove_hw_watchpoint (struct target_ops *self,
 }
 
 static int
-procfs_insert_hw_watchpoint (CORE_ADDR addr, int len, int type,
+procfs_insert_hw_watchpoint (struct target_ops *self,
+                            CORE_ADDR addr, int len, int type,
                             struct expression *cond)
 {
   return procfs_hw_watchpoint (addr, len, type);
index b4eae9d7d3b35a610aa227af35ae27d12fea169b..f77d225d763edc5339846fa3b38dd0e265cff477 100644 (file)
@@ -2076,7 +2076,8 @@ create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
 }
 
 static int
-ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
+ppc_linux_insert_watchpoint (struct target_ops *self,
+                            CORE_ADDR addr, int len, int rw,
                             struct expression *cond)
 {
   struct lwp_info *lp;
index 26e7ac3fea4a36dc0ebb1710a91be3b0d4dff5be..e1de2ac2bc494db5096ee78429ce8d66dfad05ca 100644 (file)
@@ -4899,7 +4899,8 @@ procfs_stopped_data_address (struct target_ops *targ, CORE_ADDR *addr)
 }
 
 static int
-procfs_insert_watchpoint (CORE_ADDR addr, int len, int type,
+procfs_insert_watchpoint (struct target_ops *self,
+                         CORE_ADDR addr, int len, int type,
                          struct expression *cond)
 {
   if (!target_have_steppable_watchpoint
index 6d8eab0c053b981501f080b17a9ea8bdbacf8717..37649e4a5d73699de716f91f867b2594d818b9d3 100644 (file)
@@ -1418,7 +1418,8 @@ m32r_can_use_hw_watchpoint (struct target_ops *self,
    watchpoint.  */
 
 static int
-m32r_insert_watchpoint (CORE_ADDR addr, int len, int type,
+m32r_insert_watchpoint (struct target_ops *self,
+                       CORE_ADDR addr, int len, int type,
                        struct expression *cond)
 {
   int i;
index 174e9b3e66dfe8800a59cb75602cd1a24ae883e2..e8ef44941045b66839a95816fd7e39073586c275 100644 (file)
@@ -2426,7 +2426,8 @@ calculate_mask (CORE_ADDR addr, int len)
    watchpoint.  */
 
 static int
-mips_insert_watchpoint (CORE_ADDR addr, int len, int type,
+mips_insert_watchpoint (struct target_ops *self,
+                       CORE_ADDR addr, int len, int type,
                        struct expression *cond)
 {
   if (mips_set_breakpoint (addr, len, type))
index c797530cb7936a4bda27ce25eebeeb42791da295..d851bf798abbd1af681e783405641543b66cc058 100644 (file)
@@ -8166,7 +8166,8 @@ watchpoint_to_Z_packet (int type)
 }
 
 static int
-remote_insert_watchpoint (CORE_ADDR addr, int len, int type,
+remote_insert_watchpoint (struct target_ops *self,
+                         CORE_ADDR addr, int len, int type,
                          struct expression *cond)
 {
   struct remote_state *rs = get_remote_state ();
index 8a187aca4428990d239e5cd114bf5a5371f568b2..342d6ad86a7c5a1230efc6f3df05b75960cb4c4b 100644 (file)
@@ -508,7 +508,8 @@ s390_fix_watch_points (struct lwp_info *lp)
 }
 
 static int
-s390_insert_watchpoint (CORE_ADDR addr, int len, int type,
+s390_insert_watchpoint (struct target_ops *self,
+                       CORE_ADDR addr, int len, int type,
                        struct expression *cond)
 {
   struct lwp_info *lp;
index 68504100ddd7d173203a39c9672f97f6b5f40a17..d73792843c40c4abd7950e62c41feed9e241397d 100644 (file)
@@ -111,7 +111,8 @@ 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,
+static int debug_to_insert_watchpoint (struct target_ops *self,
+                                      CORE_ADDR, int, int,
                                       struct expression *);
 
 static int debug_to_remove_watchpoint (struct target_ops *self,
@@ -749,7 +750,8 @@ update_current_target (void)
                      struct bp_target_info *))
            return_minus_one);
   de_fault (to_insert_watchpoint,
-           (int (*) (CORE_ADDR, int, int, struct expression *))
+           (int (*) (struct target_ops *, CORE_ADDR, int, int,
+                     struct expression *))
            return_minus_one);
   de_fault (to_remove_watchpoint,
            (int (*) (struct target_ops *, CORE_ADDR, int, int,
@@ -4754,12 +4756,14 @@ debug_to_remove_hw_breakpoint (struct target_ops *self,
 }
 
 static int
-debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type,
+debug_to_insert_watchpoint (struct target_ops *self,
+                           CORE_ADDR addr, int len, int type,
                            struct expression *cond)
 {
   int retval;
 
-  retval = debug_target.to_insert_watchpoint (addr, len, type, cond);
+  retval = debug_target.to_insert_watchpoint (&debug_target,
+                                             addr, len, type, cond);
 
   fprintf_unfiltered (gdb_stdlog,
                      "target_insert_watchpoint (%s, %d, %d, %s) = %ld\n",
index defb78463a24f38b97f03eadb2b61a891b59c60b..69b8b7749d2af4c9920fd2debb7ce03a7652d0c8 100644 (file)
@@ -461,7 +461,8 @@ struct target_ops
        provided with the corresponding target_* macros.  */
     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_watchpoint) (struct target_ops *,
+                                CORE_ADDR, int, int, struct expression *);
 
     int (*to_insert_mask_watchpoint) (struct target_ops *,
                                      CORE_ADDR, CORE_ADDR, int);
@@ -1615,7 +1616,8 @@ extern char *target_thread_name (struct thread_info *);
    -1 for failure.  */
 
 #define        target_insert_watchpoint(addr, len, type, cond) \
-     (*current_target.to_insert_watchpoint) (addr, len, type, cond)
+     (*current_target.to_insert_watchpoint) (&current_target,  \
+                                            addr, len, type, cond)
 
 #define        target_remove_watchpoint(addr, len, type, cond) \
      (*current_target.to_remove_watchpoint) (&current_target,  \
This page took 0.042582 seconds and 4 git commands to generate.