From 503a628d9bced852eb0d5da7eac40fa560c26b17 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 17 Dec 2013 21:34:22 -0700 Subject: [PATCH] Add target_ops argument to to_thread_name 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add argument. * target.c (target_thread_name): Add argument. (update_current_target): Update. * linux-nat.c (linux_nat_thread_name): Add 'self' argument. --- gdb/ChangeLog | 7 +++++++ gdb/linux-nat.c | 2 +- gdb/target.c | 4 ++-- gdb/target.h | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dd73e8ef422..b84620feedc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2014-02-19 Tom Tromey + + * target.h (struct target_ops) : Add argument. + * target.c (target_thread_name): Add argument. + (update_current_target): Update. + * linux-nat.c (linux_nat_thread_name): Add 'self' argument. + 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 42a95faad00..dca4552656b 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -3993,7 +3993,7 @@ linux_nat_pid_to_str (struct target_ops *ops, ptid_t ptid) } static char * -linux_nat_thread_name (struct thread_info *thr) +linux_nat_thread_name (struct target_ops *self, struct thread_info *thr) { int pid = ptid_get_pid (thr->ptid); long lwp = ptid_get_lwp (thr->ptid); diff --git a/gdb/target.c b/gdb/target.c index 92c2e764ab0..03e4fe4e6e7 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -822,7 +822,7 @@ update_current_target (void) (char *(*) (struct target_ops *, struct thread_info *)) return_null); de_fault (to_thread_name, - (char *(*) (struct thread_info *)) + (char *(*) (struct target_ops *, struct thread_info *)) return_null); de_fault (to_stop, (void (*) (ptid_t)) @@ -2771,7 +2771,7 @@ target_thread_name (struct thread_info *info) for (t = current_target.beneath; t != NULL; t = t->beneath) { if (t->to_thread_name != NULL) - return (*t->to_thread_name) (info); + return (*t->to_thread_name) (t, info); } return NULL; diff --git a/gdb/target.h b/gdb/target.h index ca2ac0c893d..d2258022a0d 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -523,7 +523,7 @@ struct target_ops void (*to_find_new_threads) (struct target_ops *); char *(*to_pid_to_str) (struct target_ops *, ptid_t); char *(*to_extra_thread_info) (struct target_ops *, struct thread_info *); - char *(*to_thread_name) (struct thread_info *); + char *(*to_thread_name) (struct target_ops *, struct thread_info *); void (*to_stop) (ptid_t); void (*to_rcmd) (char *command, struct ui_file *output); char *(*to_pid_to_exec_file) (int pid); -- 2.30.2