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

* target.h (struct target_ops) <to_extra_thread_info>: Add
argument.
(target_extra_thread_info): Add argument.
* target.c (update_current_target): Update.
* remote.c (remote_threads_extra_info): Add 'self' argument.
* ravenscar-thread.c (ravenscar_extra_thread_info): Add 'self'
argument.
* nto-tdep.h (nto_extra_thread_info): Add 'self' argument.
* nto-tdep.c (nto_extra_thread_info): Add 'self' argument.
* linux-thread-db.c (thread_db_extra_thread_info): Add 'self'
argument.
* inf-ttrace.c (inf_ttrace_extra_thread_info): Add 'self'
argument.
* bsd-uthread.c (bsd_uthread_extra_thread_info): Add 'self'
argument.
* aix-thread.c (aix_thread_extra_thread_info): Add 'self'
argument.

gdb/ChangeLog
gdb/aix-thread.c
gdb/bsd-uthread.c
gdb/inf-ttrace.c
gdb/linux-thread-db.c
gdb/nto-tdep.c
gdb/nto-tdep.h
gdb/ravenscar-thread.c
gdb/remote.c
gdb/target.c
gdb/target.h

index de65083..dd73e8e 100644 (file)
@@ -1,5 +1,25 @@
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
+       * target.h (struct target_ops) <to_extra_thread_info>: Add
+       argument.
+       (target_extra_thread_info): Add argument.
+       * target.c (update_current_target): Update.
+       * remote.c (remote_threads_extra_info): Add 'self' argument.
+       * ravenscar-thread.c (ravenscar_extra_thread_info): Add 'self'
+       argument.
+       * nto-tdep.h (nto_extra_thread_info): Add 'self' argument.
+       * nto-tdep.c (nto_extra_thread_info): Add 'self' argument.
+       * linux-thread-db.c (thread_db_extra_thread_info): Add 'self'
+       argument.
+       * inf-ttrace.c (inf_ttrace_extra_thread_info): Add 'self'
+       argument.
+       * bsd-uthread.c (bsd_uthread_extra_thread_info): Add 'self'
+       argument.
+       * aix-thread.c (aix_thread_extra_thread_info): Add 'self'
+       argument.
+
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
        * target.h (struct target_ops) <to_program_signals>: Add argument.
        * target.c (target_program_signals): Add argument.
        * remote.c (remote_program_signals): Add 'self' argument.
index bd2a3a1..d0ad915 100644 (file)
@@ -1748,7 +1748,8 @@ aix_thread_pid_to_str (struct target_ops *ops, ptid_t ptid)
    THREAD, for use in "info threads" output.  */
 
 static char *
-aix_thread_extra_thread_info (struct thread_info *thread)
+aix_thread_extra_thread_info (struct target_ops *self,
+                             struct thread_info *thread)
 {
   struct ui_file *buf;
   int status;
index d235f41..39bc05a 100644 (file)
@@ -483,7 +483,8 @@ static char *bsd_uthread_state[] =
    INFO.  */
 
 static char *
-bsd_uthread_extra_thread_info (struct thread_info *info)
+bsd_uthread_extra_thread_info (struct target_ops *self,
+                              struct thread_info *info)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
   CORE_ADDR addr = ptid_get_tid (info->ptid);
index d046bba..5e64d8d 100644 (file)
@@ -1282,7 +1282,8 @@ inf_ttrace_thread_alive (struct target_ops *ops, ptid_t ptid)
    INFO.  */
 
 static char *
-inf_ttrace_extra_thread_info (struct thread_info *info)
+inf_ttrace_extra_thread_info (struct target_ops *self,
+                             struct thread_info *info)
 {
   struct inf_ttrace_private_thread_info* private =
     (struct inf_ttrace_private_thread_info *) info->private;
index c05ebdf..9180464 100644 (file)
@@ -1772,7 +1772,8 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid)
    INFO.  */
 
 static char *
-thread_db_extra_thread_info (struct thread_info *info)
+thread_db_extra_thread_info (struct target_ops *self,
+                            struct thread_info *info)
 {
   if (info->private == NULL)
     return NULL;
index cc61423..a160a9e 100644 (file)
@@ -362,7 +362,7 @@ static const char *nto_thread_state_str[] =
 };
 
 char *
-nto_extra_thread_info (struct thread_info *ti)
+nto_extra_thread_info (struct target_ops *self, struct thread_info *ti)
 {
   if (ti && ti->private
       && ti->private->state < ARRAY_SIZE (nto_thread_state_str))
index 03fd89d..aa965c5 100644 (file)
@@ -166,6 +166,6 @@ void nto_dummy_supply_regset (struct regcache *regcache, char *regs);
 
 int nto_in_dynsym_resolve_code (CORE_ADDR pc);
 
-char *nto_extra_thread_info (struct thread_info *);
+char *nto_extra_thread_info (struct target_ops *self, struct thread_info *);
 
 #endif
index 67a101b..cf548e7 100644 (file)
@@ -54,7 +54,8 @@ static const char ravenscar_runtime_initializer[] =
 
 static void ravenscar_find_new_threads (struct target_ops *ops);
 static ptid_t ravenscar_running_thread (void);
-static char *ravenscar_extra_thread_info (struct thread_info *tp);
+static char *ravenscar_extra_thread_info (struct target_ops *self,
+                                         struct thread_info *tp);
 static int ravenscar_thread_alive (struct target_ops *ops, ptid_t ptid);
 static void ravenscar_fetch_registers (struct target_ops *ops,
                                        struct regcache *regcache, int regnum);
@@ -240,7 +241,7 @@ ravenscar_running_thread (void)
 }
 
 static char *
-ravenscar_extra_thread_info (struct thread_info *tp)
+ravenscar_extra_thread_info (struct target_ops *self, struct thread_info *tp)
 {
   return "Ravenscar task";
 }
index 829c2b4..002a9a2 100644 (file)
@@ -2808,7 +2808,7 @@ remote_threads_info (struct target_ops *ops)
  */
 
 static char *
-remote_threads_extra_info (struct thread_info *tp)
+remote_threads_extra_info (struct target_ops *self, struct thread_info *tp)
 {
   struct remote_state *rs = get_remote_state ();
   int result;
index b516532..92c2e76 100644 (file)
@@ -819,7 +819,7 @@ update_current_target (void)
            (int (*) (struct target_ops *))
            return_zero);
   de_fault (to_extra_thread_info,
-           (char *(*) (struct thread_info *))
+           (char *(*) (struct target_ops *, struct thread_info *))
            return_null);
   de_fault (to_thread_name,
            (char *(*) (struct thread_info *))
index 3ae290b..ca2ac0c 100644 (file)
@@ -522,7 +522,7 @@ struct target_ops
     int (*to_thread_alive) (struct target_ops *, ptid_t ptid);
     void (*to_find_new_threads) (struct target_ops *);
     char *(*to_pid_to_str) (struct target_ops *, ptid_t);
-    char *(*to_extra_thread_info) (struct thread_info *);
+    char *(*to_extra_thread_info) (struct target_ops *, struct thread_info *);
     char *(*to_thread_name) (struct thread_info *);
     void (*to_stop) (ptid_t);
     void (*to_rcmd) (char *command, struct ui_file *output);
@@ -1524,7 +1524,7 @@ extern char *normal_pid_to_str (ptid_t ptid);
    is okay.  */
 
 #define target_extra_thread_info(TP) \
-     (current_target.to_extra_thread_info (TP))
+     (current_target.to_extra_thread_info (&current_target, TP))
 
 /* Return the thread's name.  A NULL result means that the target
    could not determine this thread's name.  */