From 770234d33bd301dd1893457a90e4b02cfec5c87a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 18 Dec 2013 14:46:03 -0700 Subject: convert to_pid_to_str 2014-02-19 Tom Tromey * target-delegates.c: Rebuild. * target.c (target_pid_to_str): Unconditionally delegate. (init_dummy_target): Don't initialize to_pid_to_str. (default_pid_to_str): Rename from dummy_pid_to_str. * target.h (struct target_ops) : Use TARGET_DEFAULT_FUNC. --- gdb/target-delegates.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gdb/target-delegates.c') diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 781167a..fe827fa 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -554,6 +554,13 @@ tdefault_find_new_threads (struct target_ops *self) } static char * +delegate_pid_to_str (struct target_ops *self, ptid_t arg1) +{ + self = self->beneath; + return self->to_pid_to_str (self, arg1); +} + +static char * delegate_extra_thread_info (struct target_ops *self, struct thread_info *arg1) { self = self->beneath; @@ -1298,6 +1305,8 @@ install_delegators (struct target_ops *ops) ops->to_program_signals = delegate_program_signals; if (ops->to_find_new_threads == NULL) ops->to_find_new_threads = delegate_find_new_threads; + if (ops->to_pid_to_str == NULL) + ops->to_pid_to_str = delegate_pid_to_str; if (ops->to_extra_thread_info == NULL) ops->to_extra_thread_info = delegate_extra_thread_info; if (ops->to_thread_name == NULL) @@ -1458,6 +1467,7 @@ install_dummy_methods (struct target_ops *ops) ops->to_pass_signals = tdefault_pass_signals; ops->to_program_signals = tdefault_program_signals; ops->to_find_new_threads = tdefault_find_new_threads; + ops->to_pid_to_str = default_pid_to_str; ops->to_extra_thread_info = tdefault_extra_thread_info; ops->to_thread_name = tdefault_thread_name; ops->to_stop = tdefault_stop; -- cgit v1.1