aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-18 14:46:03 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:15 -0700
commit770234d33bd301dd1893457a90e4b02cfec5c87a (patch)
treee0f91a43023a20ac814fe623f56fa055fe970567 /gdb/target-delegates.c
parent09b0dc2b57ce52fc478710797dabdf46bfd5abd1 (diff)
downloadgdb-770234d33bd301dd1893457a90e4b02cfec5c87a.zip
gdb-770234d33bd301dd1893457a90e4b02cfec5c87a.tar.gz
gdb-770234d33bd301dd1893457a90e4b02cfec5c87a.tar.bz2
convert to_pid_to_str
2014-02-19 Tom Tromey <tromey@redhat.com> * 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) <to_pid_to_str>: Use TARGET_DEFAULT_FUNC.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c10
1 files changed, 10 insertions, 0 deletions
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;