Add target_ops argument to to_thread_name
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:34:22 +0000 (21:34 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:45:54 +0000 (07:45 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* target.h (struct target_ops) <to_thread_name>: 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
gdb/linux-nat.c
gdb/target.c
gdb/target.h

index dd73e8ef42241ae1905809917c3c899b109cf1c4..b84620feedc0818acbe6b025c140b71dcb66563d 100644 (file)
@@ -1,3 +1,10 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target.h (struct target_ops) <to_thread_name>: 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  <tromey@redhat.com>
 
        * target.h (struct target_ops) <to_extra_thread_info>: Add
index 42a95faad00fda24b3e8f66aa2b76d0211884dfb..dca4552656b5dfdd0f8128dbb390bb6a0491b540 100644 (file)
@@ -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);
index 92c2e764ab0036cdfedce8976058b739dc3623aa..03e4fe4e6e7595fe9a898be7e9bc59c2c2c62f58 100644 (file)
@@ -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;
index ca2ac0c893da5b3186c407461114e8cfef12209e..d2258022a0dbd34291e1edd1496669c4c2b0efe9 100644 (file)
@@ -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);