aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-17 21:29:31 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:45:34 -0700
commit7bb99c53837248382434ccf26f50b42e69d0b874 (patch)
treeadf8db92d911e1fcc5675e086ffad739a3fe8921 /gdb
parent11b5219af5c54762a68469ade4005e5dd2362f87 (diff)
downloadgdb-7bb99c53837248382434ccf26f50b42e69d0b874.zip
gdb-7bb99c53837248382434ccf26f50b42e69d0b874.tar.gz
gdb-7bb99c53837248382434ccf26f50b42e69d0b874.tar.bz2
Add target_ops argument to to_insert_watchpoint
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog28
-rw-r--r--gdb/aarch64-linux-nat.c3
-rw-r--r--gdb/arm-linux-nat.c3
-rw-r--r--gdb/i386-nat.c3
-rw-r--r--gdb/ia64-linux-nat.c3
-rw-r--r--gdb/inf-ttrace.c3
-rw-r--r--gdb/mips-linux-nat.c3
-rw-r--r--gdb/nto-procfs.c6
-rw-r--r--gdb/ppc-linux-nat.c3
-rw-r--r--gdb/procfs.c3
-rw-r--r--gdb/remote-m32r-sdi.c3
-rw-r--r--gdb/remote-mips.c3
-rw-r--r--gdb/remote.c3
-rw-r--r--gdb/s390-linux-nat.c3
-rw-r--r--gdb/target.c12
-rw-r--r--gdb/target.h6
16 files changed, 68 insertions, 20 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 38ddd87..ac6184b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,33 @@
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
argument.
(target_remove_watchpoint): Add argument.
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
index d509031..a69e31f 100644
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -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;
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index d964009..c4b34cd 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -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;
diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c
index e130670..cd766cf 100644
--- a/gdb/i386-nat.c
+++ b/gdb/i386-nat.c
@@ -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
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index 31ee479..ccd55b2 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -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;
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
index 7e77424..919515f 100644
--- a/gdb/inf-ttrace.c
+++ b/gdb/inf-ttrace.c
@@ -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;
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index 9c1c8cb..d8781fc 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -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;
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
index 7407efc..0a7ed55 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -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);
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index b4eae9d..f77d225 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -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;
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 26e7ac3..e1de2ac 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -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
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
index 6d8eab0..37649e4 100644
--- a/gdb/remote-m32r-sdi.c
+++ b/gdb/remote-m32r-sdi.c
@@ -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;
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 174e9b3..e8ef449 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -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))
diff --git a/gdb/remote.c b/gdb/remote.c
index c797530..d851bf7 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -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 ();
diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c
index 8a187ac..342d6ad 100644
--- a/gdb/s390-linux-nat.c
+++ b/gdb/s390-linux-nat.c
@@ -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;
diff --git a/gdb/target.c b/gdb/target.c
index 6850410..d737928 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -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",
diff --git a/gdb/target.h b/gdb/target.h
index defb784..69b8b77 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -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, \