convert to_traceframe_info

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.
This commit is contained in:
Tom Tromey 2013-12-18 14:18:10 -07:00
parent d6522a229d
commit 92155eeb14
4 changed files with 28 additions and 13 deletions

@ -1,3 +1,12 @@
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.

@ -971,6 +971,19 @@ tdefault_static_tracepoint_markers_by_strid (struct target_ops *self, const char
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)
{
@ -1151,6 +1164,8 @@ install_delegators (struct target_ops *ops)
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;
}
@ -1240,5 +1255,6 @@ install_dummy_methods (struct target_ops *ops)
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;
}

@ -66,8 +66,6 @@ static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
static int return_zero (void);
static void *return_null (void);
void target_ignore (void);
static void target_command (char *, int);
@ -712,7 +710,7 @@ update_current_target (void)
/* 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);
@ -750,9 +748,6 @@ update_current_target (void)
(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);
@ -3478,12 +3473,6 @@ return_zero (void)
return 0;
}
static void *
return_null (void)
{
return 0;
}
/*
* Find the next target down the stack from the specified target.
*/

@ -958,7 +958,8 @@ struct target_ops
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. */