convert to_thread_address_space to use TARGET_DEFAULT_FUNC

This converts to_thread_address_space to use TARGET_DEFAULT_FUNC.

This method was one of a handful not using the normal target
delegation approach.  The only rationale here is consistency in the
target vector.

Built and regtested on x86-64 Fedora 20.

2014-06-04  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (default_thread_address_space): New function.
	(target_thread_address_space): Simplify.
	* target.h (struct target_ops) <to_thread_address_space>: Add
	TARGET_DEFAULT_FUNC.
This commit is contained in:
Tom Tromey
2014-02-21 10:33:42 -07:00
parent 03388bb71c
commit 8eaff7cd13
4 changed files with 44 additions and 23 deletions

View File

@ -945,6 +945,13 @@ delegate_thread_architecture (struct target_ops *self, ptid_t arg1)
return self->to_thread_architecture (self, arg1);
}
static struct address_space *
delegate_thread_address_space (struct target_ops *self, ptid_t arg1)
{
self = self->beneath;
return self->to_thread_address_space (self, arg1);
}
static void
delegate_trace_init (struct target_ops *self)
{
@ -1782,6 +1789,8 @@ install_delegators (struct target_ops *ops)
ops->to_can_run_breakpoint_commands = delegate_can_run_breakpoint_commands;
if (ops->to_thread_architecture == NULL)
ops->to_thread_architecture = delegate_thread_architecture;
if (ops->to_thread_address_space == NULL)
ops->to_thread_address_space = delegate_thread_address_space;
if (ops->to_trace_init == NULL)
ops->to_trace_init = delegate_trace_init;
if (ops->to_download_tracepoint == NULL)
@ -1974,6 +1983,7 @@ install_dummy_methods (struct target_ops *ops)
ops->to_supports_evaluation_of_breakpoint_conditions = tdefault_supports_evaluation_of_breakpoint_conditions;
ops->to_can_run_breakpoint_commands = tdefault_can_run_breakpoint_commands;
ops->to_thread_architecture = default_thread_architecture;
ops->to_thread_address_space = default_thread_address_space;
ops->to_trace_init = tdefault_trace_init;
ops->to_download_tracepoint = tdefault_download_tracepoint;
ops->to_can_download_tracepoint = tdefault_can_download_tracepoint;