aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-17 21:29:57 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:45:36 -0700
commitc3a5ff89630f46c52ca43ee7e73933687815ca18 (patch)
treeb5a647c31e5a589a3140ad8348063d570da534a3
parent31568a15a22275374f7a98675c967c83c3f9ac2a (diff)
downloadgdb-c3a5ff89630f46c52ca43ee7e73933687815ca18.zip
gdb-c3a5ff89630f46c52ca43ee7e73933687815ca18.tar.gz
gdb-c3a5ff89630f46c52ca43ee7e73933687815ca18.tar.bz2
Add target_ops argument to to_can_accel_watchpoint_condition
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_can_accel_watchpoint_condition>: Add argument. (target_can_accel_watchpoint_condition): Add argument. * target.c (debug_to_can_accel_watchpoint_condition): Add argument. (update_current_target): Update. * ppc-linux-nat.c (ppc_linux_can_accel_watchpoint_condition): Add 'self' argument.
-rw-r--r--gdb/ChangeLog11
-rw-r--r--gdb/ppc-linux-nat.c3
-rw-r--r--gdb/target.c12
-rw-r--r--gdb/target.h6
4 files changed, 25 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 763aa27..6dde680 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,16 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
+ * target.h (struct target_ops)
+ <to_can_accel_watchpoint_condition>: Add argument.
+ (target_can_accel_watchpoint_condition): Add argument.
+ * target.c (debug_to_can_accel_watchpoint_condition): Add
+ argument.
+ (update_current_target): Update.
+ * ppc-linux-nat.c (ppc_linux_can_accel_watchpoint_condition): Add
+ 'self' argument.
+
+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.
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index dd0fe8c..fcfd452 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -2015,7 +2015,8 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond,
the condition expression, thus only triggering the watchpoint when it is
true. */
static int
-ppc_linux_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
+ppc_linux_can_accel_watchpoint_condition (struct target_ops *self,
+ CORE_ADDR addr, int len, int rw,
struct expression *cond)
{
CORE_ADDR data_value;
diff --git a/gdb/target.c b/gdb/target.c
index 9cc5a46..6836c9d 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -128,7 +128,8 @@ static int debug_to_watchpoint_addr_within_range (struct target_ops *,
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,
+static int debug_to_can_accel_watchpoint_condition (struct target_ops *self,
+ CORE_ADDR, int, int,
struct expression *);
static void debug_to_terminal_init (void);
@@ -764,7 +765,8 @@ update_current_target (void)
de_fault (to_region_ok_for_hw_watchpoint,
default_region_ok_for_hw_watchpoint);
de_fault (to_can_accel_watchpoint_condition,
- (int (*) (CORE_ADDR, int, int, struct expression *))
+ (int (*) (struct target_ops *, CORE_ADDR, int, int,
+ struct expression *))
return_zero);
de_fault (to_terminal_init,
(void (*) (void))
@@ -4666,12 +4668,14 @@ debug_to_region_ok_for_hw_watchpoint (struct target_ops *self,
}
static int
-debug_to_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
+debug_to_can_accel_watchpoint_condition (struct target_ops *self,
+ CORE_ADDR addr, int len, int rw,
struct expression *cond)
{
int retval;
- retval = debug_target.to_can_accel_watchpoint_condition (addr, len,
+ retval = debug_target.to_can_accel_watchpoint_condition (&debug_target,
+ addr, len,
rw, cond);
fprintf_unfiltered (gdb_stdlog,
diff --git a/gdb/target.h b/gdb/target.h
index e91af7d..d164a54 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -482,7 +482,8 @@ struct target_ops
int (*to_region_ok_for_hw_watchpoint) (struct target_ops *,
CORE_ADDR, int);
- int (*to_can_accel_watchpoint_condition) (CORE_ADDR, int, int,
+ int (*to_can_accel_watchpoint_condition) (struct target_ops *,
+ CORE_ADDR, int, int,
struct expression *);
int (*to_masked_watch_num_registers) (struct target_ops *,
CORE_ADDR, CORE_ADDR);
@@ -1679,7 +1680,8 @@ extern int target_ranged_break_num_registers (void);
For this reason, GDB will still evaluate the condition expression when
the watchpoint triggers. */
#define target_can_accel_watchpoint_condition(addr, len, type, cond) \
- (*current_target.to_can_accel_watchpoint_condition) (addr, len, type, cond)
+ (*current_target.to_can_accel_watchpoint_condition) (&current_target, \
+ addr, len, type, cond)
/* Return number of debug registers needed for a masked watchpoint,
-1 if masked watchpoints are not supported or -2 if the given address