aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog26
-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/inf-ttrace.c3
-rw-r--r--gdb/mips-linux-nat.c3
-rw-r--r--gdb/ppc-linux-nat.c3
-rw-r--r--gdb/procfs.c3
-rw-r--r--gdb/remote.c3
-rw-r--r--gdb/s390-linux-nat.c3
-rw-r--r--gdb/spu-multiarch.c6
-rw-r--r--gdb/target.c15
-rw-r--r--gdb/target.h6
13 files changed, 62 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ac6184b..763aa27 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,31 @@
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
argument.
(target_insert_watchpoint): Add argument.
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
index a69e31f..c6437fe 100644
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -1403,7 +1403,8 @@ aarch64_linux_remove_watchpoint (struct target_ops *self,
/* 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;
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index c4b34cd..75f58ca 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -1076,7 +1076,8 @@ arm_linux_remove_hw_breakpoint (struct target_ops *self,
/* 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;
diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c
index cd766cf..2f80a6e 100644
--- a/gdb/i386-nat.c
+++ b/gdb/i386-nat.c
@@ -664,7 +664,8 @@ i386_remove_watchpoint (struct target_ops *self,
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));
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
index 919515f..d046bba 100644
--- a/gdb/inf-ttrace.c
+++ b/gdb/inf-ttrace.c
@@ -368,7 +368,8 @@ inf_ttrace_can_use_hw_breakpoint (struct target_ops *self,
}
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;
}
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index d8781fc..4c28733 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -589,7 +589,8 @@ mips_linux_stopped_data_address (struct target_ops *t, CORE_ADDR *paddr)
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;
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index f77d225..dd0fe8c 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -1497,7 +1497,8 @@ ppc_linux_can_use_hw_breakpoint (struct target_ops *self,
}
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)
diff --git a/gdb/procfs.c b/gdb/procfs.c
index e1de2ac..511ddf1 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -4930,7 +4930,8 @@ procfs_remove_watchpoint (struct target_ops *self,
}
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
diff --git a/gdb/remote.c b/gdb/remote.c
index d851bf7..6424304 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -8259,7 +8259,8 @@ int remote_hw_watchpoint_length_limit = -1;
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;
diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c
index 342d6ad..5c38952 100644
--- a/gdb/s390-linux-nat.c
+++ b/gdb/s390-linux-nat.c
@@ -566,7 +566,8 @@ s390_can_use_hw_breakpoint (struct target_ops *self,
}
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;
}
diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c
index c3263ba..bd6c836 100644
--- a/gdb/spu-multiarch.c
+++ b/gdb/spu-multiarch.c
@@ -118,7 +118,8 @@ spu_thread_architecture (struct target_ops *ops, ptid_t ptid)
/* 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)
@@ -129,7 +130,8 @@ spu_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
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;
}
diff --git a/gdb/target.c b/gdb/target.c
index d737928..9cc5a46 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -52,7 +52,8 @@ static void default_terminal_info (const char *, int);
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;
@@ -124,7 +125,8 @@ static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *);
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 *);
@@ -3641,7 +3643,8 @@ target_fileio_read_stralloc (const char *filename)
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);
}
@@ -4647,11 +4650,13 @@ debug_to_can_use_hw_breakpoint (struct target_ops *self,
}
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",
diff --git a/gdb/target.h b/gdb/target.h
index 69b8b77..e91af7d 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -479,7 +479,8 @@ struct target_ops
/* 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 *);
@@ -1606,7 +1607,8 @@ extern char *target_thread_name (struct thread_info *);
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) (&current_target, \
+ addr, len)
/* Set/clear a hardware watchpoint starting at ADDR, for LEN bytes.