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.
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;
/* 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;
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
}
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;
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;
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;
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,
}
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);
}
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;
}
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
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;
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))
}
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 ();
}
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;
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,
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,
}
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",
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);
-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) (¤t_target, \
+ addr, len, type, cond)
#define target_remove_watchpoint(addr, len, type, cond) \
(*current_target.to_remove_watchpoint) (¤t_target, \