From: =?utf-8?b?SMOpY3RvciBPcsOzbiBNYXJ0w61uZXo=?= <zumbi@debian.org>
Date: Wed, 20 Feb 2019 13:25:36 +0100
Subject: struct-thread_info

===================================================================
---
 gdb/breakpoint.c              |  2 +-
 gdb/infcmd.c                  |  4 ++--
 gdb/linux-tdep.c              |  2 +-
 gdb/mi/mi-main.c              |  2 +-
 gdb/progspace-and-thread.c    |  2 +-
 gdb/python/py-record-btrace.c |  8 ++++----
 gdb/remote.c                  |  6 +++---
 gdb/thread.c                  | 22 +++++++++++-----------
 8 files changed, 24 insertions(+), 24 deletions(-)

Index: gdb/gdb/breakpoint.c
===================================================================
--- gdb.orig/gdb/breakpoint.c
+++ gdb/gdb/breakpoint.c
@@ -12684,7 +12684,7 @@ momentary_bkpt_print_mention (struct bre
 
 longjmp_breakpoint::~longjmp_breakpoint ()
 {
-  thread_info *tp = find_thread_global_id (this->thread);
+  struct thread_info *tp = find_thread_global_id (this->thread);
 
   if (tp != NULL)
     tp->initiating_frame = null_frame_id;
Index: gdb/gdb/infcmd.c
===================================================================
--- gdb.orig/gdb/infcmd.c
+++ gdb/gdb/infcmd.c
@@ -525,7 +525,7 @@ run_command_1 (const char *args, int fro
   /* Queue a pending event so that the program stops immediately.  */
   if (run_how == RUN_STOP_AT_FIRST_INSN)
     {
-      thread_info *thr = inferior_thread ();
+      struct thread_info *thr = inferior_thread ();
       thr->suspend.waitstatus_pending_p = 1;
       thr->suspend.waitstatus.kind = TARGET_WAITKIND_STOPPED;
       thr->suspend.waitstatus.value.sig = GDB_SIGNAL_0;
Index: gdb/gdb/linux-tdep.c
===================================================================
--- gdb.orig/gdb/linux-tdep.c
+++ gdb/gdb/linux-tdep.c
@@ -1693,7 +1693,7 @@ linux_collect_thread_registers (const st
    buffer.  */
 
 static gdb::byte_vector
-linux_get_siginfo_data (thread_info *thread, struct gdbarch *gdbarch)
+linux_get_siginfo_data (struct thread_info *thread, struct gdbarch *gdbarch)
 {
   struct type *siginfo_type;
   LONGEST bytes_read;
Index: gdb/gdb/mi/mi-main.c
===================================================================
--- gdb.orig/gdb/mi/mi-main.c
+++ gdb/gdb/mi/mi-main.c
@@ -545,7 +545,7 @@ mi_cmd_thread_select (const char *comman
     error (_("-thread-select: USAGE: threadnum."));
 
   int num = value_as_long (parse_and_eval (argv[0]));
-  thread_info *thr = find_thread_global_id (num);
+  struct thread_info *thr = find_thread_global_id (num);
   if (thr == NULL)
     error (_("Thread ID %d not known."), num);
 
Index: gdb/gdb/progspace-and-thread.c
===================================================================
--- gdb.orig/gdb/progspace-and-thread.c
+++ gdb/gdb/progspace-and-thread.c
@@ -29,7 +29,7 @@ switch_to_program_space_and_thread (prog
 
   if (inf->pid != 0)
     {
-      thread_info *tp = any_live_thread_of_inferior (inf);
+      struct thread_info *tp = any_live_thread_of_inferior (inf);
 
       if (tp != NULL)
 	{
Index: gdb/gdb/python/py-record-btrace.c
===================================================================
--- gdb.orig/gdb/python/py-record-btrace.c
+++ gdb/gdb/python/py-record-btrace.c
@@ -73,7 +73,7 @@ btrace_insn_from_recpy_insn (const PyObj
 {
   const btrace_insn *insn;
   const recpy_element_object *obj;
-  thread_info *tinfo;
+  struct thread_info *tinfo;
   btrace_insn_iterator iter;
 
   if (Py_TYPE (pyobject) != &recpy_insn_type)
@@ -116,7 +116,7 @@ btrace_func_from_recpy_func (const PyObj
 {
   const btrace_function *func;
   const recpy_element_object *obj;
-  thread_info *tinfo;
+  struct thread_info *tinfo;
   btrace_call_iterator iter;
 
   if (Py_TYPE (pyobject) != &recpy_func_type)
@@ -154,7 +154,7 @@ btrace_func_from_recpy_func (const PyObj
    gdb.RecordInstruction or gdb.RecordGap object for it accordingly.  */
 
 static PyObject *
-btpy_insn_or_gap_new (thread_info *tinfo, Py_ssize_t number)
+btpy_insn_or_gap_new (struct thread_info *tinfo, Py_ssize_t number)
 {
   btrace_insn_iterator iter;
   int err_code;
@@ -336,7 +336,7 @@ PyObject *
 recpy_bt_func_level (PyObject *self, void *closure)
 {
   const btrace_function * const func = btrace_func_from_recpy_func (self);
-  thread_info *tinfo;
+  struct thread_info *tinfo;
 
   if (func == NULL)
     return NULL;
Index: gdb/gdb/remote.c
===================================================================
--- gdb.orig/gdb/remote.c
+++ gdb/gdb/remote.c
@@ -2418,7 +2418,7 @@ remote_target::remote_add_inferior (bool
   return inf;
 }
 
-static remote_thread_info *get_remote_thread_info (thread_info *thread);
+static remote_thread_info *get_remote_thread_info (struct thread_info *thread);
 static remote_thread_info *get_remote_thread_info (remote_target *target,
 						   ptid_t ptid);
 
@@ -2545,7 +2545,7 @@ remote_target::remote_notice_new_inferio
 /* Return THREAD's private thread data, creating it if necessary.  */
 
 static remote_thread_info *
-get_remote_thread_info (thread_info *thread)
+get_remote_thread_info (struct thread_info *thread)
 {
   gdb_assert (thread != NULL);
 
@@ -4373,7 +4373,7 @@ remote_target::add_current_inferior_and_
   /* Add the main thread and switch to it.  Don't try reading
      registers yet, since we haven't fetched the target description
      yet.  */
-  thread_info *tp = add_thread_silent (this, curr_ptid);
+  struct thread_info *tp = add_thread_silent (this, curr_ptid);
   switch_to_thread_no_regs (tp);
 }
 
Index: gdb/gdb/thread.c
===================================================================
--- gdb.orig/gdb/thread.c
+++ gdb/gdb/thread.c
@@ -64,21 +64,21 @@ static thread_info *current_thread_;
 class scoped_inc_dec_ref
 {
 public:
-  explicit scoped_inc_dec_ref (const std::vector<thread_info *> &thrds)
+  explicit scoped_inc_dec_ref (const std::vector<struct thread_info *> &thrds)
     : m_thrds (thrds)
   {
-    for (thread_info *thr : m_thrds)
+    for (struct thread_info *thr : m_thrds)
       thr->incref ();
   }
 
   ~scoped_inc_dec_ref ()
   {
-    for (thread_info *thr : m_thrds)
+    for (struct thread_info *thr : m_thrds)
       thr->decref ();
   }
 
 private:
-  const std::vector<thread_info *> &m_thrds;
+  const std::vector<struct thread_info *> &m_thrds;
 };
 
 /* Returns true if THR is the current thread.  */
@@ -203,7 +203,7 @@ clear_thread_inferior_resources (struct
 /* Set the TP's state as exited.  */
 
 static void
-set_thread_exited (thread_info *tp, bool silent)
+set_thread_exited (struct thread_info *tp, bool silent)
 {
   /* Dead threads don't need to step-over.  Remove from queue.  */
   if (tp->step_over_next != NULL)
@@ -245,7 +245,7 @@ init_thread_list (void)
 static struct thread_info *
 new_thread (struct inferior *inf, ptid_t ptid)
 {
-  thread_info *tp = new thread_info (inf, ptid);
+  struct thread_info *tp = new struct thread_info (inf, ptid);
 
   if (inf->thread_list == NULL)
     inf->thread_list = tp;
@@ -1505,7 +1505,7 @@ print_thread_id (struct thread_info *thr
    ascending order.  */
 
 static bool
-tp_array_compar_ascending (const thread_info *a, const thread_info *b)
+tp_array_compar_ascending (const struct thread_info *a, const struct thread_info *b)
 {
   if (a->inf->num != b->inf->num)
     return a->inf->num < b->inf->num;
@@ -1518,7 +1518,7 @@ tp_array_compar_ascending (const thread_
    descending order.  */
 
 static bool
-tp_array_compar_descending (const thread_info *a, const thread_info *b)
+tp_array_compar_descending (const struct thread_info *a, const struct thread_info *b)
 {
   if (a->inf->num != b->inf->num)
     return a->inf->num > b->inf->num;
@@ -1656,10 +1656,10 @@ thread_apply_all_command (const char *cm
 	 thread, in case the command is one that wipes threads.  E.g.,
 	 detach, kill, disconnect, etc., or even normally continuing
 	 over an inferior or thread exit.  */
-      std::vector<thread_info *> thr_list_cpy;
+      std::vector<struct thread_info *> thr_list_cpy;
       thr_list_cpy.reserve (tc);
 
-      for (thread_info *tp : all_non_exited_threads ())
+      for (struct thread_info *tp : all_non_exited_threads ())
 	thr_list_cpy.push_back (tp);
       gdb_assert (thr_list_cpy.size () == tc);
 
@@ -1674,7 +1674,7 @@ thread_apply_all_command (const char *cm
 
       scoped_restore_current_thread restore_thread;
 
-      for (thread_info *thr : thr_list_cpy)
+      for (struct thread_info *thr : thr_list_cpy)
 	if (switch_to_thread_if_alive (thr))
 	  thr_try_catch_cmd (thr, cmd, from_tty, flags);
     }
@@ -1998,7 +1998,7 @@ show_print_thread_events (struct ui_file
 /* See gdbthread.h.  */
 
 void
-thread_select (const char *tidstr, thread_info *tp)
+thread_select (const char *tidstr, struct thread_info *tp)
 {
   if (!switch_to_thread_if_alive (tp))
     error (_("Thread ID %s has terminated."), tidstr);
