aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-17 21:37:56 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:46:08 -0700
commitefcc2da70ea8bdb9153f1e717e84c0b9d976b394 (patch)
tree73956e0e86eb2e7c678e7d2f8ca61b9e16737d2f
parent6de37a3aae4e37be2ea2ba8f9141ba63937f2c48 (diff)
downloadgdb-efcc2da70ea8bdb9153f1e717e84c0b9d976b394.zip
gdb-efcc2da70ea8bdb9153f1e717e84c0b9d976b394.tar.gz
gdb-efcc2da70ea8bdb9153f1e717e84c0b9d976b394.tar.bz2
Add target_ops argument to to_supports_evaluation_of_breakpoint_conditions
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_supports_evaluation_of_breakpoint_conditions>: Add argument. (target_supports_evaluation_of_breakpoint_conditions): Add argument. * target.c (update_current_target): Update. * remote.c (remote_supports_cond_breakpoints): Add 'self' argument. (remote_insert_breakpoint): Add 'self' argument. (remote_insert_hw_breakpoint): Add 'self' argument. (remote_supports_cond_breakpoints): Add 'self' argument.
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/remote.c8
-rw-r--r--gdb/target.c2
-rw-r--r--gdb/target.h4
4 files changed, 20 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index af9419d..527fc3b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,18 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
+ * target.h (struct target_ops)
+ <to_supports_evaluation_of_breakpoint_conditions>: Add argument.
+ (target_supports_evaluation_of_breakpoint_conditions): Add
+ argument.
+ * target.c (update_current_target): Update.
+ * remote.c (remote_supports_cond_breakpoints): Add 'self'
+ argument.
+ (remote_insert_breakpoint): Add 'self' argument.
+ (remote_insert_hw_breakpoint): Add 'self' argument.
+ (remote_supports_cond_breakpoints): Add 'self' argument.
+
+2014-02-19 Tom Tromey <tromey@redhat.com>
+
* target.h (struct target_ops) <to_supports_string_tracing>: Add
argument.
(target_supports_string_tracing): Add argument.
diff --git a/gdb/remote.c b/gdb/remote.c
index 1f62b8d..2d74bc1 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -226,7 +226,7 @@ static int remote_read_description_p (struct target_ops *target);
static void remote_console_output (char *msg);
-static int remote_supports_cond_breakpoints (void);
+static int remote_supports_cond_breakpoints (struct target_ops *self);
static int remote_can_run_breakpoint_commands (void);
@@ -8081,7 +8081,7 @@ remote_insert_breakpoint (struct target_ops *ops,
p += hexnumstr (p, addr);
xsnprintf (p, endbuf - p, ",%d", bpsize);
- if (remote_supports_cond_breakpoints ())
+ if (remote_supports_cond_breakpoints (ops))
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
if (remote_can_run_breakpoint_commands ())
@@ -8360,7 +8360,7 @@ remote_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
p += hexnumstr (p, (ULONGEST) addr);
xsnprintf (p, endbuf - p, ",%x", bp_tgt->placed_size);
- if (remote_supports_cond_breakpoints ())
+ if (remote_supports_cond_breakpoints (self))
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
if (remote_can_run_breakpoint_commands ())
@@ -10258,7 +10258,7 @@ remote_supports_cond_tracepoints (void)
}
static int
-remote_supports_cond_breakpoints (void)
+remote_supports_cond_breakpoints (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
diff --git a/gdb/target.c b/gdb/target.c
index 5ff1174..4dfa8dd 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -930,7 +930,7 @@ update_current_target (void)
(struct traceframe_info * (*) (void))
return_null);
de_fault (to_supports_evaluation_of_breakpoint_conditions,
- (int (*) (void))
+ (int (*) (struct target_ops *))
return_zero);
de_fault (to_can_run_breakpoint_commands,
(int (*) (void))
diff --git a/gdb/target.h b/gdb/target.h
index 9ad6d4d..ce73863 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -686,7 +686,7 @@ struct target_ops
/* Does this target support evaluation of breakpoint conditions on its
end? */
- int (*to_supports_evaluation_of_breakpoint_conditions) (void);
+ int (*to_supports_evaluation_of_breakpoint_conditions) (struct target_ops *);
/* Does this target support evaluation of breakpoint commands on its
end? */
@@ -1123,7 +1123,7 @@ int target_supports_disable_randomization (void);
on its end. */
#define target_supports_evaluation_of_breakpoint_conditions() \
- (*current_target.to_supports_evaluation_of_breakpoint_conditions) ()
+ (*current_target.to_supports_evaluation_of_breakpoint_conditions) (&current_target)
/* Returns true if this target can handle breakpoint commands
on its end. */