diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-18 14:16:51 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-19 07:48:01 -0700 |
commit | 4c3e44251dcb59f096a4d27006c36ffcc0057398 (patch) | |
tree | 8b9054a45e51418fc39ab376cb09f9111befb8b2 | |
parent | dcd6917ff721b568fed57e4f24101fa226288ae1 (diff) | |
download | gdb-4c3e44251dcb59f096a4d27006c36ffcc0057398.zip gdb-4c3e44251dcb59f096a4d27006c36ffcc0057398.tar.gz gdb-4c3e44251dcb59f096a4d27006c36ffcc0057398.tar.bz2 |
convert to_static_tracepoint_marker_at
2014-02-19 Tom Tromey <tromey@redhat.com>
* target-delegates.c: Rebuild.
* target.c (update_current_target): Don't inherit or default
to_static_tracepoint_marker_at.
* target.h (struct target_ops) <to_static_tracepoint_marker_at>:
Use TARGET_DEFAULT_RETURN.
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/target-delegates.c | 16 | ||||
-rw-r--r-- | gdb/target.c | 6 | ||||
-rw-r--r-- | gdb/target.h | 3 |
4 files changed, 27 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 51db79c..840e15d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -2,6 +2,14 @@ * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default + to_static_tracepoint_marker_at. + * target.h (struct target_ops) <to_static_tracepoint_marker_at>: + Use TARGET_DEFAULT_RETURN. + +2014-02-19 Tom Tromey <tromey@redhat.com> + + * target-delegates.c: Rebuild. + * target.c (update_current_target): Don't inherit or default to_set_permissions. * target.h (struct target_ops) <to_set_permissions>: Use TARGET_DEFAULT_IGNORE. diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 0b06593..2aea888 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -946,6 +946,19 @@ tdefault_set_permissions (struct target_ops *self) } static int +delegate_static_tracepoint_marker_at (struct target_ops *self, CORE_ADDR arg1, struct static_tracepoint_marker *arg2) +{ + self = self->beneath; + return self->to_static_tracepoint_marker_at (self, arg1, arg2); +} + +static int +tdefault_static_tracepoint_marker_at (struct target_ops *self, CORE_ADDR arg1, struct static_tracepoint_marker *arg2) +{ + return 0; +} + +static int delegate_supports_btrace (struct target_ops *self) { self = self->beneath; @@ -1121,6 +1134,8 @@ install_delegators (struct target_ops *ops) ops->to_get_tib_address = delegate_get_tib_address; if (ops->to_set_permissions == NULL) ops->to_set_permissions = delegate_set_permissions; + if (ops->to_static_tracepoint_marker_at == NULL) + ops->to_static_tracepoint_marker_at = delegate_static_tracepoint_marker_at; if (ops->to_supports_btrace == NULL) ops->to_supports_btrace = delegate_supports_btrace; } @@ -1208,5 +1223,6 @@ install_dummy_methods (struct target_ops *ops) ops->to_set_trace_notes = tdefault_set_trace_notes; ops->to_get_tib_address = tdefault_get_tib_address; ops->to_set_permissions = tdefault_set_permissions; + ops->to_static_tracepoint_marker_at = tdefault_static_tracepoint_marker_at; ops->to_supports_btrace = tdefault_supports_btrace; } diff --git a/gdb/target.c b/gdb/target.c index 25017ac..ca7ed5e 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -710,7 +710,7 @@ update_current_target (void) /* Do not inherit to_set_trace_notes. */ /* Do not inherit to_get_tib_address. */ /* Do not inherit to_set_permissions. */ - INHERIT (to_static_tracepoint_marker_at, t); + /* Do not inherit to_static_tracepoint_marker_at. */ INHERIT (to_static_tracepoint_markers_by_strid, t); INHERIT (to_traceframe_info, t); INHERIT (to_use_agent, t); @@ -750,10 +750,6 @@ update_current_target (void) (void (*) (struct target_ops *, ptid_t)) target_ignore); current_target.to_read_description = NULL; - de_fault (to_static_tracepoint_marker_at, - (int (*) (struct target_ops *, - CORE_ADDR, struct static_tracepoint_marker *)) - return_zero); de_fault (to_static_tracepoint_markers_by_strid, (VEC(static_tracepoint_marker_p) * (*) (struct target_ops *, const char *)) diff --git a/gdb/target.h b/gdb/target.h index 896b563..0969a82 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -937,7 +937,8 @@ struct target_ops /* Look for a static tracepoint marker at ADDR, and fill in MARKER with its details. Return 1 on success, 0 on failure. */ int (*to_static_tracepoint_marker_at) (struct target_ops *, CORE_ADDR, - struct static_tracepoint_marker *marker); + struct static_tracepoint_marker *marker) + TARGET_DEFAULT_RETURN (0); /* Return a vector of all tracepoints markers string id ID, or all markers if ID is NULL. */ |