+2014-02-19 Tom Tromey <tromey@redhat.com>
+
+ * target.h (struct target_ops) <to_region_ok_for_hw_watchpoint>:
+ Add argument.
+ (target_region_ok_for_hw_watchpoint): Add argument.
+ * target.c (debug_to_region_ok_for_hw_watchpoint): Add argument.
+ (default_region_ok_for_hw_watchpoint): Add argument.
+ * spu-multiarch.c (spu_region_ok_for_hw_watchpoint): Add argument.
+ * s390-linux-nat.c (s390_region_ok_for_hw_watchpoint): Add 'self'
+ argument.
+ * remote.c (remote_region_ok_for_hw_watchpoint): Add 'self'
+ argument.
+ * procfs.c (procfs_region_ok_for_hw_watchpoint): Add 'self'
+ argument.
+ * ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Add
+ 'self' argument.
+ * mips-linux-nat.c (mips_linux_region_ok_for_hw_watchpoint): Add
+ 'self' argument.
+ * inf-ttrace.c (inf_ttrace_region_ok_for_hw_watchpoint): Add
+ 'self' argument.
+ * i386-nat.c (i386_region_ok_for_watchpoint): Add 'self' argument.
+ * arm-linux-nat.c (arm_linux_region_ok_for_hw_watchpoint): Add
+ 'self' argument.
+ * aarch64-linux-nat.c (aarch64_linux_region_ok_for_hw_watchpoint):
+ Add 'self' argument.
+
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_insert_watchpoint>: Add
/* Implement the "to_region_ok_for_hw_watchpoint" target_ops method. */
static int
-aarch64_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+aarch64_linux_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int len)
{
CORE_ADDR aligned_addr;
/* Are we able to use a hardware watchpoint for the LEN bytes starting at
ADDR? */
static int
-arm_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+arm_linux_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int len)
{
const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap ();
CORE_ADDR max_wp_length, aligned_addr;
address ADDR and whose length is LEN bytes. */
static int
-i386_region_ok_for_watchpoint (CORE_ADDR addr, int len)
+i386_region_ok_for_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int len)
{
struct i386_debug_reg_state *state
= i386_debug_reg_state (ptid_get_pid (inferior_ptid));
}
static int
-inf_ttrace_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+inf_ttrace_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int len)
{
return 1;
}
the specified region can be covered by the watch registers. */
static int
-mips_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+mips_linux_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int len)
{
struct pt_watch_regs dummy_regs;
int i;
}
static int
-ppc_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+ppc_linux_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int len)
{
/* Handle sub-8-byte quantities. */
if (len <= 0)
}
static int
-procfs_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+procfs_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int len)
{
/* The man page for proc(4) on Solaris 2.6 and up says that the
system can support "thousands" of hardware watchpoints, but gives
int remote_hw_breakpoint_limit = -1;
static int
-remote_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+remote_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int len)
{
if (remote_hw_watchpoint_length_limit == 0)
return 0;
}
static int
-s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, int cnt)
+s390_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int cnt)
{
return 1;
}
/* Override the to_region_ok_for_hw_watchpoint routine. */
static int
-spu_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+spu_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int len)
{
struct target_ops *ops_beneath = find_target_beneath (&spu_ops);
while (ops_beneath && !ops_beneath->to_region_ok_for_hw_watchpoint)
return 0;
if (ops_beneath)
- return ops_beneath->to_region_ok_for_hw_watchpoint (addr, len);
+ return ops_beneath->to_region_ok_for_hw_watchpoint (ops_beneath,
+ addr, len);
return 0;
}
static int default_watchpoint_addr_within_range (struct target_ops *,
CORE_ADDR, CORE_ADDR, int);
-static int default_region_ok_for_hw_watchpoint (CORE_ADDR, int);
+static int default_region_ok_for_hw_watchpoint (struct target_ops *,
+ CORE_ADDR, int);
static void tcomplain (void) ATTRIBUTE_NORETURN;
static int debug_to_watchpoint_addr_within_range (struct target_ops *,
CORE_ADDR, CORE_ADDR, int);
-static int debug_to_region_ok_for_hw_watchpoint (CORE_ADDR, int);
+static int debug_to_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR, int);
static int debug_to_can_accel_watchpoint_condition (CORE_ADDR, int, int,
struct expression *);
static int
-default_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+default_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int len)
{
return (len <= gdbarch_ptr_bit (target_gdbarch ()) / TARGET_CHAR_BIT);
}
}
static int
-debug_to_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
+debug_to_region_ok_for_hw_watchpoint (struct target_ops *self,
+ CORE_ADDR addr, int len)
{
CORE_ADDR retval;
- retval = debug_target.to_region_ok_for_hw_watchpoint (addr, len);
+ retval = debug_target.to_region_ok_for_hw_watchpoint (&debug_target,
+ addr, len);
fprintf_unfiltered (gdb_stdlog,
"target_region_ok_for_hw_watchpoint (%s, %ld) = %s\n",
/* Documentation of this routine is provided with the corresponding
target_* macro. */
- int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR, int);
+ int (*to_region_ok_for_hw_watchpoint) (struct target_ops *,
+ CORE_ADDR, int);
int (*to_can_accel_watchpoint_condition) (CORE_ADDR, int, int,
struct expression *);
memory region, or zero if not supported. */
#define target_region_ok_for_hw_watchpoint(addr, len) \
- (*current_target.to_region_ok_for_hw_watchpoint) (addr, len)
+ (*current_target.to_region_ok_for_hw_watchpoint) (¤t_target, \
+ addr, len)
/* Set/clear a hardware watchpoint starting at ADDR, for LEN bytes.