diff options
author | Tom Tromey <tromey@redhat.com> | 2014-02-21 10:33:42 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-06-04 09:24:27 -0600 |
commit | 8eaff7cd138d8517f8c2fbc8be9b8c6eaf649bd9 (patch) | |
tree | 93cb713503e1e533b60619692d6529ed82bfca18 /gdb/target-delegates.c | |
parent | 03388bb71c1a1d1c613bb963f3d9287cfd100138 (diff) | |
download | fsf-binutils-gdb-8eaff7cd138d8517f8c2fbc8be9b8c6eaf649bd9.zip fsf-binutils-gdb-8eaff7cd138d8517f8c2fbc8be9b8c6eaf649bd9.tar.gz fsf-binutils-gdb-8eaff7cd138d8517f8c2fbc8be9b8c6eaf649bd9.tar.bz2 |
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.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r-- | gdb/target-delegates.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 0e95cf0..e6fbb44 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -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; |