+2014-02-19 Tom Tromey <tromey@redhat.com>
+
+ * target-delegates.c: Rebuild.
+ * target.c (update_current_target): Don't inherit or default
+ to_traceframe_info.
+ (return_null): Remove.
+ * target.h (struct target_ops) <to_traceframe_info>: Use
+ TARGET_DEFAULT_RETURN.
+
2014-02-19 Tom Tromey <tromey@redhat.com>
* target-delegates.c: Rebuild.
tcomplain ();
}
+static struct traceframe_info *
+delegate_traceframe_info (struct target_ops *self)
+{
+ self = self->beneath;
+ return self->to_traceframe_info (self);
+}
+
+static struct traceframe_info *
+tdefault_traceframe_info (struct target_ops *self)
+{
+ return 0;
+}
+
static int
delegate_supports_btrace (struct target_ops *self)
{
ops->to_static_tracepoint_marker_at = delegate_static_tracepoint_marker_at;
if (ops->to_static_tracepoint_markers_by_strid == NULL)
ops->to_static_tracepoint_markers_by_strid = delegate_static_tracepoint_markers_by_strid;
+ if (ops->to_traceframe_info == NULL)
+ ops->to_traceframe_info = delegate_traceframe_info;
if (ops->to_supports_btrace == NULL)
ops->to_supports_btrace = delegate_supports_btrace;
}
ops->to_set_permissions = tdefault_set_permissions;
ops->to_static_tracepoint_marker_at = tdefault_static_tracepoint_marker_at;
ops->to_static_tracepoint_markers_by_strid = tdefault_static_tracepoint_markers_by_strid;
+ ops->to_traceframe_info = tdefault_traceframe_info;
ops->to_supports_btrace = tdefault_supports_btrace;
}
static int return_zero (void);
-static void *return_null (void);
-
void target_ignore (void);
static void target_command (char *, int);
/* Do not inherit to_set_permissions. */
/* Do not inherit to_static_tracepoint_marker_at. */
/* Do not inherit to_static_tracepoint_markers_by_strid. */
- INHERIT (to_traceframe_info, t);
+ /* Do not inherit to_traceframe_info. */
INHERIT (to_use_agent, t);
INHERIT (to_can_use_agent, t);
INHERIT (to_augmented_libraries_svr4_read, t);
(void (*) (struct target_ops *, ptid_t))
target_ignore);
current_target.to_read_description = NULL;
- de_fault (to_traceframe_info,
- (struct traceframe_info * (*) (struct target_ops *))
- return_null);
de_fault (to_supports_evaluation_of_breakpoint_conditions,
(int (*) (struct target_ops *))
return_zero);
return 0;
}
-static void *
-return_null (void)
-{
- return 0;
-}
-
/*
* Find the next target down the stack from the specified target.
*/
is available in the read-only sections. This method should not
cache data; higher layers take care of caching, invalidating,
and re-fetching when necessary. */
- struct traceframe_info *(*to_traceframe_info) (struct target_ops *);
+ struct traceframe_info *(*to_traceframe_info) (struct target_ops *)
+ TARGET_DEFAULT_RETURN (0);
/* Ask the target to use or not to use agent according to USE. Return 1
successful, 0 otherwise. */