This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Please define thread_info as struct thread_info (and other stuff)


Hello,

When building gdb version 8.2 on GNU/Hurd several problems arise that need to be
solved. One problem is that most files in gdb/ have sloppy definitions of struct
thread_info, causing a build stop fore every occurrence. They are excluding the
struct part, making the build (and port) on Hurd very cumbersome. Can you please
fix all bad references to thread_info upstream? I don't really understand how
gcc can let these errors pass on GNU/Linux.

Attached are a lot of patches and files fixing these problems, 61 in total. A
test build of Debian version gdb-8.2-1 on GNU/Linux with the attached patches
(and patched files) applied works fine! 

Furthermore the script gdbarch.sh needs patching and the resulting files
gdbarch.{c,h} are used in the Linux build. They are not included here due to
size constraints. The generated file target-delegates.c was also used after
patching target.h and generating it with: make-target-delegates target.h >
target-delegates.c. Not included here either, also due to size constraints.

Attached are also four old patches needed to build the 8.1 version of gdb:
gdb_configure.nat.patch
gdb-PATH_MAX.patch
gnu-nat.c.patch
struct-thread_info.patch
and a very old Debian PATH_MAX patch: solve_PATH_MAX_issue.patch. Includes is
also the original and new Debian 8.2-1 patch file: series.

More patches will be needed for a successful port of gdb-8.2 to GNU/hurd, but
please fix the above problems upstream first.

Thanks!
Index: gdb-8.2/gdb/aarch64-linux-tdep.c
===================================================================
--- gdb-8.2.orig/gdb/aarch64-linux-tdep.c
+++ gdb-8.2/gdb/aarch64-linux-tdep.c
@@ -567,7 +567,7 @@ aarch64_stap_parse_special_token (struct
 
 static LONGEST
 aarch64_linux_get_syscall_number (struct gdbarch *gdbarch,
-				  thread_info *thread)
+				  struct thread_info *thread)
 {
   struct regcache *regs = get_thread_regcache (thread);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
Index: gdb-8.2/gdb/ada-lang.h
===================================================================
--- gdb-8.2.orig/gdb/ada-lang.h
+++ gdb-8.2/gdb/ada-lang.h
@@ -401,7 +401,7 @@ extern int valid_task_id (int);
 
 extern struct ada_task_info *ada_get_task_info_from_ptid (ptid_t ptid);
 
-extern int ada_get_task_number (thread_info *thread);
+extern int ada_get_task_number (struct thread_info *thread);
 
 typedef void (ada_task_list_iterator_ftype) (struct ada_task_info *task);
 extern void iterate_over_live_ada_tasks
Index: gdb-8.2/gdb/ada-tasks.c
===================================================================
--- gdb-8.2.orig/gdb/ada-tasks.c
+++ gdb-8.2/gdb/ada-tasks.c
@@ -292,7 +292,7 @@ get_ada_tasks_inferior_data (struct infe
    if the task could not be found.  */
 
 int
-ada_get_task_number (thread_info *thread)
+ada_get_task_number (struct thread_info *thread)
 {
   int i;
   struct inferior *inf = thread->inf;
@@ -1124,7 +1124,7 @@ print_ada_task_info (struct ui_out *uiou
       /* Print the associated Thread ID.  */
       if (uiout->is_mi_like_p ())
         {
-	  thread_info *thread = find_thread_ptid (task_info->ptid);
+	  struct thread_info *thread = find_thread_ptid (task_info->ptid);
 
 	  if (thread != NULL)
 	    uiout->field_int ("thread-id", thread->global_num);
@@ -1326,7 +1326,7 @@ task_command_1 (const char *taskno_str,
      computed if target_get_ada_task_ptid has not been implemented for
      our target (yet).  Rather than cause an assertion error in that case,
      it's nicer for the user to just refuse to perform the task switch.  */
-  thread_info *tp = find_thread_ptid (task_info->ptid);
+  struct thread_info *tp = find_thread_ptid (task_info->ptid);
   if (tp == NULL)
     error (_("Unable to compute thread ID for task %d.\n"
              "Cannot switch to this task."),
Index: gdb-8.2/gdb/amd64-linux-tdep.c
===================================================================
--- gdb-8.2.orig/gdb/amd64-linux-tdep.c
+++ gdb-8.2/gdb/amd64-linux-tdep.c
@@ -222,7 +222,7 @@ amd64_linux_sigcontext_addr (struct fram
 
 static LONGEST
 amd64_linux_get_syscall_number (struct gdbarch *gdbarch,
-				thread_info *thread)
+				struct thread_info *thread)
 {
   struct regcache *regcache = get_thread_regcache (thread);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
Index: gdb-8.2/gdb/arm-linux-tdep.c
===================================================================
--- gdb-8.2.orig/gdb/arm-linux-tdep.c
+++ gdb-8.2/gdb/arm-linux-tdep.c
@@ -820,7 +820,7 @@ arm_linux_sigreturn_next_pc (struct regc
 
 static LONGEST
 arm_linux_get_syscall_number (struct gdbarch *gdbarch,
-			      thread_info *thread)
+			      struct thread_info *thread)
 {
   struct regcache *regs = get_thread_regcache (thread);
 
Index: gdb-8.2/gdb/breakpoint.c
===================================================================
--- gdb-8.2.orig/gdb/breakpoint.c
+++ gdb-8.2/gdb/breakpoint.c
@@ -4339,7 +4339,7 @@ bpstat_clear_actions (void)
   if (inferior_ptid == null_ptid)
     return;
 
-  thread_info *tp = inferior_thread ();
+  struct thread_info *tp = inferior_thread ();
   for (bs = tp->control.stop_bpstat; bs != NULL; bs = bs->next)
     {
       bs->commands = NULL;
@@ -4470,13 +4470,13 @@ bpstat_do_actions_1 (bpstat *bsp)
 /* Helper for bpstat_do_actions.  Get the current thread, if there's
    one, is alive and has execution.  Return NULL otherwise.  */
 
-static thread_info *
+static struct thread_info *
 get_bpstat_thread ()
 {
   if (inferior_ptid == null_ptid || !target_has_execution)
     return NULL;
 
-  thread_info *tp = inferior_thread ();
+  struct thread_info *tp = inferior_thread ();
   if (tp->state == THREAD_EXITED || tp->executing)
     return NULL;
   return tp;
@@ -4486,7 +4486,7 @@ void
 bpstat_do_actions (void)
 {
   struct cleanup *cleanup_if_error = make_bpstat_clear_actions_cleanup ();
-  thread_info *tp;
+  struct thread_info *tp;
 
   /* Do any commands attached to breakpoint we are stopped at.  */
   while ((tp = get_bpstat_thread ()) != NULL)
@@ -5170,7 +5170,7 @@ bpstat_check_watchpoint (bpstat bs)
    breakpoint, set BS->stop to 0.  */
 
 static void
-bpstat_check_breakpoint_conditions (bpstat bs, thread_info *thread)
+bpstat_check_breakpoint_conditions (bpstat bs, struct thread_info *thread)
 {
   const struct bp_location *bl;
   struct breakpoint *b;
@@ -5402,7 +5402,7 @@ build_bpstat_chain (const address_space
 
 bpstat
 bpstat_stop_status (const address_space *aspace,
-		    CORE_ADDR bp_addr, thread_info *thread,
+		    CORE_ADDR bp_addr, struct thread_info *thread,
 		    const struct target_waitstatus *ws,
 		    bpstat stop_chain)
 {
Index: gdb-8.2/gdb/breakpoint.h
===================================================================
--- gdb-8.2.orig/gdb/breakpoint.h
+++ gdb-8.2/gdb/breakpoint.h
@@ -947,7 +947,7 @@ extern bpstat build_bpstat_chain (const
    commands, FIXME??? fields.  */
 
 extern bpstat bpstat_stop_status (const address_space *aspace,
-				  CORE_ADDR pc, thread_info *thread,
+				  CORE_ADDR pc, struct thread_info *thread,
 				  const struct target_waitstatus *ws,
 				  bpstat stop_chain = NULL);
 
Index: gdb-8.2/gdb/btrace.c
===================================================================
--- gdb-8.2.orig/gdb/btrace.c
+++ gdb-8.2/gdb/btrace.c
@@ -3233,7 +3233,7 @@ maint_btrace_packet_history_cmd (const c
   struct btrace_thread_info *btinfo;
   unsigned int size, begin, end, from, to;
 
-  thread_info *tp = find_thread_ptid (inferior_ptid);
+  struct thread_info *tp = find_thread_ptid (inferior_ptid);
   if (tp == NULL)
     error (_("No thread."));
 
@@ -3340,7 +3340,7 @@ maint_btrace_clear_packet_history_cmd (c
   if (inferior_ptid == null_ptid)
     error (_("No thread."));
 
-  thread_info *tp = inferior_thread ();
+  struct thread_info *tp = inferior_thread ();
   btrace_thread_info *btinfo = &tp->btrace;
 
   /* Must clear the maint data before - it depends on BTINFO->DATA.  */
@@ -3359,7 +3359,7 @@ maint_btrace_clear_cmd (const char *args
   if (inferior_ptid == null_ptid)
     error (_("No thread."));
 
-  thread_info *tp = inferior_thread ();
+  struct thread_info *tp = inferior_thread ();
   btrace_clear (tp);
 }
 
@@ -3422,7 +3422,7 @@ maint_info_btrace_cmd (const char *args,
   if (inferior_ptid == null_ptid)
     error (_("No thread."));
 
-  thread_info *tp = inferior_thread ();
+  struct thread_info *tp = inferior_thread ();
 
   btinfo = &tp->btrace;
 
Index: gdb-8.2/gdb/compile/compile-object-load.c
===================================================================
--- gdb-8.2.orig/gdb/compile/compile-object-load.c
+++ gdb-8.2/gdb/compile/compile-object-load.c
@@ -555,7 +555,7 @@ get_regs_type (struct symbol *func_sym,
 static void
 store_regs (struct type *regs_type, CORE_ADDR regs_base)
 {
-  thread_info *thread = inferior_thread ();
+  struct thread_info *thread = inferior_thread ();
   struct gdbarch *gdbarch = target_gdbarch ();
   struct regcache *regcache = get_thread_regcache (thread);
   int fieldno;
Index: gdb-8.1/gdb/configure.nat
===================================================================
--- gdb-8.1.orig/gdb/configure.nat
+++ gdb-8.1/gdb/configure.nat
@@ -209,7 +209,7 @@ case ${gdb_host} in
 	    i386)
 		# Host: Intel 386 running the GNU Hurd
 		NATDEPFILES='i386-gnu-nat.o gnu-nat.o \
-		     x86-nat.o x86-dregs.o fork-child.o \
+		     x86-nat.o x86-dregs.o fork-child.o fork-inferior.o \
 		     notify_S.o process_reply_S.o msg_reply_S.o \
 		     msg_U.o exc_request_U.o exc_request_S.o'
 		HAVE_NATIVE_GCORE_HOST=1
Index: gdb-8.2/gdb/corelow.c
===================================================================
--- gdb-8.2.orig/gdb/corelow.c
+++ gdb-8.2/gdb/corelow.c
@@ -452,7 +452,7 @@ core_target_open (const char *arg, int f
 	 which was the "main" thread.  The latter case shouldn't
 	 usually happen, but we're dealing with input here, which can
 	 always be broken in different ways.  */
-      thread_info *thread = first_thread_of_inferior (current_inferior ());
+      struct thread_info *thread = first_thread_of_inferior (current_inferior ());
 
       if (thread == NULL)
 	{
Index: gdb-8.2/gdb/dummy-frame.c
===================================================================
--- gdb-8.2.orig/gdb/dummy-frame.c
+++ gdb-8.2/gdb/dummy-frame.c
@@ -37,7 +37,7 @@ struct dummy_frame_id
   struct frame_id id;
 
   /* The thread this dummy_frame relates to.  */
-  thread_info *thread;
+  struct thread_info *thread;
 };
 
 /* Return whether dummy_frame_id *ID1 and *ID2 are equal.  */
@@ -89,7 +89,7 @@ static struct dummy_frame *dummy_frame_s
 
 void
 dummy_frame_push (struct infcall_suspend_state *caller_state,
-		  const frame_id *dummy_id, thread_info *thread)
+		  const frame_id *dummy_id, struct thread_info *thread)
 {
   struct dummy_frame *dummy_frame;
 
@@ -202,7 +202,7 @@ lookup_dummy_frame (struct dummy_frame_i
    If the frame isn't found, flag an internal error.  */
 
 void
-dummy_frame_pop (frame_id dummy_id, thread_info *thread)
+dummy_frame_pop (frame_id dummy_id, struct thread_info *thread)
 {
   struct dummy_frame **dp;
   struct dummy_frame_id id = { dummy_id, thread };
@@ -218,7 +218,7 @@ dummy_frame_pop (frame_id dummy_id, thre
    free its memory.  */
 
 void
-dummy_frame_discard (struct frame_id dummy_id, thread_info *thread)
+dummy_frame_discard (struct frame_id dummy_id, struct thread_info *thread)
 {
   struct dummy_frame **dp;
   struct dummy_frame_id id = { dummy_id, thread };
@@ -231,7 +231,7 @@ dummy_frame_discard (struct frame_id dum
 /* See dummy-frame.h.  */
 
 void
-register_dummy_frame_dtor (frame_id dummy_id, thread_info *thread,
+register_dummy_frame_dtor (frame_id dummy_id, struct thread_info *thread,
 			   dummy_frame_dtor_ftype *dtor, void *dtor_data)
 {
   struct dummy_frame_id id = { dummy_id, thread };
Index: gdb-8.2/gdb/dummy-frame.h
===================================================================
--- gdb-8.2.orig/gdb/dummy-frame.h
+++ gdb-8.2/gdb/dummy-frame.h
@@ -35,7 +35,7 @@ struct frame_unwind;
 
 extern void dummy_frame_push (infcall_suspend_state *caller_state,
 			      const frame_id *dummy_id,
-			      thread_info *thread);
+			      struct thread_info *thread);
 
 /* Pop the dummy frame DUMMY_ID, restoring program state to that before the
    frame was created.
@@ -46,9 +46,9 @@ extern void dummy_frame_push (infcall_su
    stack, because the other frames may be for different threads, and there's
    currently no way to tell which stack frame is for which thread.  */
 
-extern void dummy_frame_pop (frame_id dummy_id, thread_info *thread);
+extern void dummy_frame_pop (frame_id dummy_id, struct thread_info *thread);
 
-extern void dummy_frame_discard (frame_id dummy_id, thread_info *thread);
+extern void dummy_frame_discard (frame_id dummy_id, struct thread_info *thread);
 
 /* If the PC falls in a dummy frame, return a dummy frame
    unwinder.  */
@@ -64,7 +64,7 @@ typedef void (dummy_frame_dtor_ftype) (v
    destructors may be registered, they will be called in the reverse
    order of registrations (LIFO).  */
 extern void register_dummy_frame_dtor (frame_id dummy_id,
-				       thread_info *thread,
+				       struct thread_info *thread,
 				       dummy_frame_dtor_ftype *dtor,
 				       void *dtor_data);
 
Index: gdb-8.2/gdb/elfread.c
===================================================================
--- gdb-8.2.orig/gdb/elfread.c
+++ gdb-8.2/gdb/elfread.c
@@ -972,7 +972,7 @@ elf_gnu_ifunc_resolver_stop (struct brea
 static void
 elf_gnu_ifunc_resolver_return_stop (struct breakpoint *b)
 {
-  thread_info *thread = inferior_thread ();
+  struct thread_info *thread = inferior_thread ();
   struct gdbarch *gdbarch = get_frame_arch (get_current_frame ());
   struct type *func_func_type = builtin_type (gdbarch)->builtin_func_func;
   struct type *value_type = TYPE_TARGET_TYPE (func_func_type);
Index: gdb-8.2/gdb/frame.c
===================================================================
--- gdb-8.2.orig/gdb/frame.c
+++ gdb-8.2/gdb/frame.c
@@ -1625,7 +1625,7 @@ has_stack_frames (void)
       if (inferior_ptid == null_ptid)
 	return 0;
 
-      thread_info *tp = inferior_thread ();
+      struct thread_info *tp = inferior_thread ();
       /* Don't try to read from a dead thread.  */
       if (tp->state == THREAD_EXITED)
 	return 0;
--- a/gdb/gdbarch.h	2018-09-05 09:44:28.000000000 +0200
+++ b/gdb/gdbarch.h	2034-05-25 01:25:18.000000000 +0200
@@ -1170,8 +1170,8 @@
 
 extern int gdbarch_get_syscall_number_p (struct gdbarch *gdbarch);
 
-typedef LONGEST (gdbarch_get_syscall_number_ftype) (struct gdbarch *gdbarch, thread_info *thread);
-extern LONGEST gdbarch_get_syscall_number (struct gdbarch *gdbarch, thread_info *thread);
+typedef LONGEST (gdbarch_get_syscall_number_ftype) (struct gdbarch *gdbarch, struct thread_info *thread);
+extern LONGEST gdbarch_get_syscall_number (struct gdbarch *gdbarch, struct thread_info *thread);
 extern void set_gdbarch_get_syscall_number (struct gdbarch *gdbarch, gdbarch_get_syscall_number_ftype *get_syscall_number);
 
 /* The filename of the XML syscall for this architecture. */
Index: gdb-8.2/gdb/gdbarch.sh
===================================================================
--- gdb-8.2.orig/gdb/gdbarch.sh
+++ gdb-8.2/gdb/gdbarch.sh
@@ -904,7 +904,7 @@ M;void;record_special_symbol;struct objf
 # Function for the 'catch syscall' feature.
 
 # Get architecture-specific system calls information from registers.
-M;LONGEST;get_syscall_number;thread_info *thread;thread
+M;LONGEST;get_syscall_number;struct thread_info *thread;thread
 
 # The filename of the XML syscall for this architecture.
 v;const char *;xml_syscall_file;;;0;0;;0;pstring (gdbarch->xml_syscall_file)
Index: gdb-8.2/gdb/gnu-nat.c
===================================================================
--- gdb-8.2.orig/gdb/gnu-nat.c
+++ gdb-8.2/gdb/gnu-nat.c
@@ -45,6 +45,14 @@ extern "C"
 #include <portinfo.h>
 }
 
+#ifdef __STDC_LIMIT_MACROS
+#undef __STDC_LIMIT_MACROS
+#endif
+
+#ifdef __STDC_CONSTANT_MACROS
+#undef __STDC_CONSTANT_MACROS
+#endif
+
 #include "defs.h"
 
 #include <ctype.h>
@@ -2264,7 +2272,7 @@ gnu_nat_target::attach (const char *args
 void
 gnu_nat_target::detach (inferior *inf, int from_tty)
 {
-  int pid;
+  int pid = -1;
 
   if (from_tty)
     {
@@ -2283,9 +2291,10 @@ gnu_nat_target::detach (inferior *inf, i
   inf_detach (gnu_current_inf);
 
   inferior_ptid = null_ptid;
-  detach_inferior (pid);
+  detach_inferior (inf);
 
-  inf_child_maybe_unpush_target (ops);
+  //  inf_child_maybe_unpush_target (ops);
+  maybe_unpush_target ();
 }
 
 
Index: gdb-8.2/gdb/gnu-nat.h
===================================================================
--- gdb-8.2.orig/gdb/gnu-nat.h
+++ gdb-8.2/gdb/gnu-nat.h
@@ -21,6 +21,8 @@
 
 #include <unistd.h>
 #include <mach.h>
+#include "target.h"
+#include "inf-child.h"
 
 struct inf;
 
@@ -108,6 +110,11 @@ extern int gnu_debug_flag;
 
 struct gnu_nat_target : public inf_child_target
 {
+  /*
+public:
+  gnu_nat_target ();
+  ~gnu_nat_target () override = 0;
+  */
   void attach (const char *, int) override;
   bool attach_no_wait () override
   { return true; }
Index: gdb-8.2/gdb/i386-gnu-nat.c
===================================================================
--- gdb-8.2.orig/gdb/i386-gnu-nat.c
+++ gdb-8.2/gdb/i386-gnu-nat.c
@@ -63,6 +63,7 @@ using gnu_base_target = x86_nat_target<g
 using gnu_base_target = gnu_nat_target;
 #endif
 
+#if 0
 struct i386_gnu_nat_target final : public gnu_base_target
 {
   void fetch_registers (struct regcache *, int) override;
@@ -70,6 +71,7 @@ struct i386_gnu_nat_target final : publi
 };
 
 static i386_gnu_nat_target the_i386_gnu_nat_target;
+#endif
 
 /* Get the whole floating-point state of THREAD and record the values
    of the corresponding (pseudo) registers.  */
@@ -103,6 +105,7 @@ fetch_fpregs (struct regcache *regcache,
 }
 
 /* Fetch register REGNO, or all regs if REGNO is -1.  */
+#if 0
 static void
 gnu_fetch_registers (struct target_ops *ops,
 		     struct regcache *regcache, int regno)
@@ -159,10 +162,12 @@ gnu_fetch_registers (struct target_ops *
       fetch_fpregs (regcache, thread);
     }
 }
+#endif
 
 
 /* Store the whole floating-point state into THREAD using information
    from the corresponding (pseudo) registers.  */
+#if 0
 static void
 store_fpregs (const struct regcache *regcache, struct proc *thread, int regno)
 {
@@ -192,8 +197,10 @@ store_fpregs (const struct regcache *reg
       return;
     }
 }
+#endif
 
 /* Store at least register REGNO, or all regs if REGNO == -1.  */
+#if 0
 static void
 gnu_store_registers (struct target_ops *ops,
 		     struct regcache *regcache, int regno)
@@ -288,6 +295,7 @@ gnu_store_registers (struct target_ops *
       store_fpregs (regcache, thread, regno);
     }
 }
+#endif
 
 
 /* Support for debug registers.  */
@@ -439,5 +447,5 @@ _initialize_i386gnu_nat (void)
 #endif /* i386_DEBUG_STATE */
 
   /* Register the target.  */
-  add_inf_child_target (&the_i386_gnu_nat_target);
+  //  add_inf_child_target (&the_i386_gnu_nat_target);
 }
Index: gdb-8.2/gdb/i386-linux-tdep.c
===================================================================
--- gdb-8.2.orig/gdb/i386-linux-tdep.c
+++ gdb-8.2/gdb/i386-linux-tdep.c
@@ -559,7 +559,7 @@ i386_linux_get_syscall_number_from_regca
 
 static LONGEST
 i386_linux_get_syscall_number (struct gdbarch *gdbarch,
-			       thread_info *thread)
+			       struct thread_info *thread)
 {
   struct regcache *regcache = get_thread_regcache (thread);
 
Index: gdb-8.2/gdb/infcall.c
===================================================================
--- gdb-8.2.orig/gdb/infcall.c
+++ gdb-8.2/gdb/infcall.c
@@ -422,7 +422,7 @@ static struct value *
 get_call_return_value (struct call_return_meta_info *ri)
 {
   struct value *retval = NULL;
-  thread_info *thr = inferior_thread ();
+  struct thread_info *thr = inferior_thread ();
   bool stack_temporaries = thread_stack_temporaries_enabled_p (thr);
 
   if (TYPE_CODE (ri->value_type) == TYPE_CODE_VOID)
Index: gdb-8.2/gdb/infcmd.c
===================================================================
--- gdb-8.2.orig/gdb/infcmd.c
+++ gdb-8.2/gdb/infcmd.c
@@ -444,7 +444,7 @@ post_create_inferior (struct target_ops
   /* Now that we know the register layout, retrieve current PC.  But
      if the PC is unavailable (e.g., we're opening a core file with
      missing registers info), ignore it.  */
-  thread_info *thr = inferior_thread ();
+  struct thread_info *thr = inferior_thread ();
 
   thr->suspend.stop_pc = 0;
   TRY
@@ -2094,7 +2094,7 @@ info_program_command (const char *args,
   if (ptid == null_ptid)
     error (_("No selected thread."));
 
-  thread_info *tp = find_thread_ptid (ptid);
+  struct thread_info *tp = find_thread_ptid (ptid);
 
   if (tp->state == THREAD_EXITED)
     error (_("Invalid selected thread."));
@@ -2940,7 +2940,7 @@ attach_command (const char *args, int fr
    as stopped.  */
 
 void
-notice_new_inferior (thread_info *thr, int leave_running, int from_tty)
+notice_new_inferior (struct thread_info *thr, int leave_running, int from_tty)
 {
   enum attach_post_wait_mode mode
     = leave_running ? ATTACH_POST_WAIT_RESUME : ATTACH_POST_WAIT_NOTHING;
Index: gdb-8.2/gdb/inferior.c
===================================================================
--- gdb-8.2.orig/gdb/inferior.c
+++ gdb-8.2/gdb/inferior.c
@@ -575,7 +575,7 @@ detach_inferior_command (const char *arg
 	  continue;
 	}
 
-      thread_info *tp = any_thread_of_inferior (inf);
+      struct thread_info *tp = any_thread_of_inferior (inf);
       if (tp == NULL)
 	{
 	  warning (_("Inferior ID %d has no threads."), num);
@@ -612,7 +612,7 @@ kill_inferior_command (const char *args,
 	  continue;
 	}
 
-      thread_info *tp = any_thread_of_inferior (inf);
+      struct thread_info *tp = any_thread_of_inferior (inf);
       if (tp == NULL)
 	{
 	  warning (_("Inferior ID %d has no threads."), num);
@@ -643,7 +643,7 @@ inferior_command (const char *args, int
     {
       if (inf != current_inferior ())
 	{
-	  thread_info *tp = any_thread_of_inferior (inf);
+	  struct thread_info *tp = any_thread_of_inferior (inf);
 	  if (tp == NULL)
 	    error (_("Inferior has no threads."));
 
Index: gdb-8.2/gdb/inflow.c
===================================================================
--- gdb-8.2.orig/gdb/inflow.c
+++ gdb-8.2/gdb/inflow.c
@@ -544,8 +544,8 @@ void
 child_interrupt (struct target_ops *self)
 {
   /* Interrupt the first inferior that has a resumed thread.  */
-  thread_info *thr;
-  thread_info *resumed = NULL;
+  struct thread_info *thr;
+  struct thread_info *resumed = NULL;
   ALL_NON_EXITED_THREADS (thr)
     {
       if (thr->executing)
Index: gdb-8.2/gdb/infrun.c
===================================================================
--- gdb-8.2.orig/gdb/infrun.c
+++ gdb-8.2/gdb/infrun.c
@@ -694,7 +694,7 @@ follow_fork (void)
 	     target to follow it (in either direction).  We'll
 	     afterwards refuse to resume, and inform the user what
 	     happened.  */
-	  thread_info *wait_thread
+	  struct thread_info *wait_thread
 	    = find_thread_ptid (wait_ptid);
 	  switch_to_thread (wait_thread);
 	  should_resume = 0;
@@ -767,7 +767,7 @@ follow_fork (void)
 	    /* If we followed the child, switch to it...  */
 	    if (follow_child)
 	      {
-		thread_info *child_thr = find_thread_ptid (child);
+		struct thread_info *child_thr = find_thread_ptid (child);
 		switch_to_thread (child_thr);
 
 		/* ... and preserve the stepping state, in case the
@@ -1493,7 +1493,7 @@ struct displaced_step_inferior_state
   /* If this is not nullptr, this is the thread carrying out a
      displaced single-step in process PID.  This thread's state will
      require fixing up once it has completed its step.  */
-  thread_info *step_thread;
+  struct thread_info *step_thread;
 
   /* The architecture the thread had when we stepped it.  */
   struct gdbarch *step_gdbarch;
@@ -1551,7 +1551,7 @@ displaced_step_in_progress_any_inferior
    step.  */
 
 static int
-displaced_step_in_progress_thread (thread_info *thread)
+displaced_step_in_progress_thread (struct thread_info *thread)
 {
   struct displaced_step_inferior_state *displaced;
 
@@ -1746,7 +1746,7 @@ displaced_step_dump_bytes (struct ui_fil
    if this instruction can't be displaced stepped.  */
 
 static int
-displaced_step_prepare_throw (thread_info *tp)
+displaced_step_prepare_throw (struct thread_info *tp)
 {
   struct cleanup *ignore_cleanups;
   regcache *regcache = get_thread_regcache (tp);
@@ -1885,7 +1885,7 @@ displaced_step_prepare_throw (thread_inf
    attempts at displaced stepping if we get a memory error.  */
 
 static int
-displaced_step_prepare (thread_info *thread)
+displaced_step_prepare (struct thread_info *thread)
 {
   int prepared = -1;
 
@@ -1960,7 +1960,7 @@ displaced_step_restore (struct displaced
    -1.  If the thread wasn't displaced stepping, return 0.  */
 
 static int
-displaced_step_fixup (thread_info *event_thread, enum gdb_signal signal)
+displaced_step_fixup (struct thread_info *event_thread, enum gdb_signal signal)
 {
   struct cleanup *old_cleanups;
   struct displaced_step_inferior_state *displaced
@@ -4751,7 +4751,7 @@ handle_no_resumed (struct execution_cont
       if (inf->pid == 0)
 	continue;
 
-      thread_info *thread = any_live_thread_of_inferior (inf);
+      struct thread_info *thread = any_live_thread_of_inferior (inf);
       if (thread == NULL)
 	{
 	  if (debug_infrun)
@@ -5212,8 +5212,8 @@ Cannot fill $_exitsignal with the correc
 
 	  should_resume = follow_fork ();
 
-	  thread_info *parent = ecs->event_thread;
-	  thread_info *child = find_thread_ptid (ecs->ws.value.related_pid);
+	  struct thread_info *parent = ecs->event_thread;
+	  struct thread_info *child = find_thread_ptid (ecs->ws.value.related_pid);
 
 	  /* At this point, the parent is marked running, and the
 	     child is marked stopped.  */
Index: gdb-8.2/gdb/inline-frame.c
===================================================================
--- gdb-8.2.orig/gdb/inline-frame.c
+++ gdb-8.2/gdb/inline-frame.c
@@ -37,7 +37,7 @@
    keep our own list.  */
 struct inline_state
 {
-  inline_state (thread_info *thread_, int skipped_frames_, CORE_ADDR saved_pc_,
+  inline_state (struct thread_info *thread_, int skipped_frames_, CORE_ADDR saved_pc_,
 		symbol *skipped_symbol_)
     : thread (thread_), skipped_frames (skipped_frames_), saved_pc (saved_pc_),
       skipped_symbol (skipped_symbol_)
@@ -45,7 +45,7 @@ struct inline_state
 
   /* The thread this data relates to.  It should be a currently
      stopped thread.  */
-  thread_info *thread;
+  struct thread_info *thread;
 
   /* The number of inlined functions we are skipping.  Each of these
      functions can be stepped in to.  */
@@ -69,7 +69,7 @@ static std::vector<inline_state> inline_
    valid.  */
 
 static struct inline_state *
-find_inline_frame_state (thread_info *thread)
+find_inline_frame_state (struct thread_info *thread)
 {
   auto state_it = std::find_if (inline_states.begin (), inline_states.end (),
 				[thread] (const inline_state &state)
@@ -321,7 +321,7 @@ stopped_by_user_bp_inline_frame (const b
 /* See inline-frame.h.  */
 
 void
-skip_inline_frames (thread_info *thread, bpstat stop_chain)
+skip_inline_frames (struct thread_info *thread, bpstat stop_chain)
 {
   const struct block *frame_block, *cur_block;
   struct symbol *last_sym = NULL;
@@ -374,7 +374,7 @@ skip_inline_frames (thread_info *thread,
 /* Step into an inlined function by unhiding it.  */
 
 void
-step_into_inline_frame (thread_info *thread)
+step_into_inline_frame (struct thread_info *thread)
 {
   inline_state *state = find_inline_frame_state (thread);
 
@@ -387,7 +387,7 @@ step_into_inline_frame (thread_info *thr
    frame.  */
 
 int
-inline_skipped_frames (thread_info *thread)
+inline_skipped_frames (struct thread_info *thread)
 {
   inline_state *state = find_inline_frame_state (thread);
 
@@ -401,7 +401,7 @@ inline_skipped_frames (thread_info *thre
    the function inlined into the current frame.  */
 
 struct symbol *
-inline_skipped_symbol (thread_info *thread)
+inline_skipped_symbol (struct thread_info *thread)
 {
   inline_state *state = find_inline_frame_state (thread);
 
Index: gdb-8.2/gdb/inline-frame.h
===================================================================
--- gdb-8.2.orig/gdb/inline-frame.h
+++ gdb-8.2/gdb/inline-frame.h
@@ -36,7 +36,7 @@ extern const struct frame_unwind inline_
    user's perspective.  GDB will stop "in" the inlined frame instead of
    the caller.  */
 
-void skip_inline_frames (thread_info *thread, struct bpstats *stop_chain);
+void skip_inline_frames (struct thread_info *thread, struct bpstats *stop_chain);
 
 /* Forget about any hidden inlined functions in PTID, which is new or
    about to be resumed.  If PTID is minus_one_ptid, forget about all
@@ -46,17 +46,17 @@ void clear_inline_frame_state (ptid_t pt
 
 /* Step into an inlined function by unhiding it.  */
 
-void step_into_inline_frame (thread_info *thread);
+void step_into_inline_frame (struct thread_info *thread);
 
 /* Return the number of hidden functions inlined into the current
    frame.  */
 
-int inline_skipped_frames (thread_info *thread);
+int inline_skipped_frames (struct thread_info *thread);
 
 /* If one or more inlined functions are hidden, return the symbol for
    the function inlined into the current frame.  */
 
-struct symbol *inline_skipped_symbol (thread_info *thread);
+struct symbol *inline_skipped_symbol (struct thread_info *thread);
 
 /* Return the number of functions inlined into THIS_FRAME.  Some of
    the callees may not have associated frames (see
Index: gdb-8.2/gdb/mi/mi-cmd-var.c
===================================================================
--- gdb-8.2.orig/gdb/mi/mi-cmd-var.c
+++ gdb-8.2/gdb/mi/mi-cmd-var.c
@@ -612,7 +612,7 @@ mi_cmd_var_update_iter (struct varobj *v
     }
   else
     {
-      thread_info *tp = find_thread_global_id (thread_id);
+      struct thread_info *tp = find_thread_global_id (thread_id);
 
       thread_stopped = (tp == NULL
 			|| tp->state == THREAD_STOPPED);
Index: gdb-8.2/gdb/mi/mi-interp.c
===================================================================
--- gdb-8.2.orig/gdb/mi/mi-interp.c
+++ gdb-8.2/gdb/mi/mi-interp.c
@@ -990,7 +990,7 @@ mi_on_resume_1 (struct mi_interp *mi, pt
 	fprintf_unfiltered (mi->raw_stdout, "*running,thread-id=\"all\"\n");
       else
 	{
-	  thread_info *tp;
+	  struct thread_info *tp;
 	  inferior *curinf = current_inferior ();
 
 	  ALL_NON_EXITED_THREADS (tp)
@@ -1000,7 +1000,7 @@ mi_on_resume_1 (struct mi_interp *mi, pt
     }
   else
     {
-      thread_info *ti = find_thread_ptid (ptid);
+      struct thread_info *ti = find_thread_ptid (ptid);
 
       gdb_assert (ti);
       mi_output_running (ti);
Index: gdb-8.2/gdb/mi/mi-main.c
===================================================================
--- gdb-8.2.orig/gdb/mi/mi-main.c
+++ gdb-8.2/gdb/mi/mi-main.c
@@ -409,7 +409,7 @@ run_one_inferior (struct inferior *inf,
 
   if (inf->pid != 0)
     {
-      thread_info *tp = any_thread_of_inferior (inf);
+      struct thread_info *tp = any_thread_of_inferior (inf);
       if (tp == NULL)
 	error (_("Inferior has no threads."));
 
@@ -2066,7 +2066,7 @@ mi_cmd_execute (struct mi_parse *parse)
 
   if (parse->thread != -1)
     {
-      thread_info *tp = find_thread_global_id (parse->thread);
+      struct thread_info *tp = find_thread_global_id (parse->thread);
 
       if (tp == NULL)
 	error (_("Invalid thread id: %d"), parse->thread);
Index: gdb-8.2/gdb/mips-linux-tdep.c
===================================================================
--- gdb-8.2.orig/gdb/mips-linux-tdep.c
+++ gdb-8.2/gdb/mips-linux-tdep.c
@@ -1316,7 +1316,7 @@ mips_linux_syscall_next_pc (struct frame
 
 static LONGEST
 mips_linux_get_syscall_number (struct gdbarch *gdbarch,
-			       thread_info *thread)
+			       struct thread_info *thread)
 {
   struct regcache *regcache = get_thread_regcache (thread);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
Index: gdb/gdb/remote.c
===================================================================
--- gdb.orig/gdb/remote.c
+++ gdb/gdb/remote.c
@@ -7333,7 +7333,7 @@ Packet: '%s'\n"),
 	  else if (strprefix (p, p1, "exec"))
 	    {
 	      ULONGEST ignored;
-	      char pathname[PATH_MAX];
+	      char *pathname = NULL;
 	      int pathlen;
 
 	      /* Determine the length of the execd pathname.  */
@@ -7342,12 +7342,14 @@ Packet: '%s'\n"),
 
 	      /* Save the pathname for event reporting and for
 		 the next run command.  */
+	      pathname = (char *) xmalloc(pathlen + 1);
 	      hex2bin (p1, (gdb_byte *) pathname, pathlen);
 	      pathname[pathlen] = '\0';
 
 	      /* This is freed during event handling.  */
 	      event->ws.value.execd_pathname = xstrdup (pathname);
 	      event->ws.kind = TARGET_WAITKIND_EXECD;
+	      xfree (pathname);
 
 	      /* Skip the registers included in this packet, since
 		 they may be for an architecture different from the
Index: gdb-8.2/gdb/ppc-linux-tdep.c
===================================================================
--- gdb-8.2.orig/gdb/ppc-linux-tdep.c
+++ gdb-8.2/gdb/ppc-linux-tdep.c
@@ -803,7 +803,7 @@ ppc_linux_trap_reg_p (struct gdbarch *gd
    r0 register.  When the function fails, it returns -1.  */
 static LONGEST
 ppc_linux_get_syscall_number (struct gdbarch *gdbarch,
-			      thread_info *thread)
+			      struct thread_info *thread)
 {
   struct regcache *regcache = get_thread_regcache (thread);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
Index: gdb-8.2/gdb/python/py-inferior.c
===================================================================
--- gdb-8.2.orig/gdb/python/py-inferior.c
+++ gdb-8.2/gdb/python/py-inferior.c
@@ -307,7 +307,7 @@ find_inferior_object (int pid)
 }
 
 thread_object *
-thread_to_thread_object (thread_info *thr)
+thread_to_thread_object (struct thread_info *thr)
 {
   gdbpy_ref<inferior_object> inf_obj (inferior_to_inferior_object (thr->inf));
   if (inf_obj == NULL)
Index: gdb-8.2/gdb/python/py-record.c
===================================================================
--- gdb-8.2.orig/gdb/python/py-record.c
+++ gdb-8.2/gdb/python/py-record.c
@@ -177,7 +177,7 @@ recpy_end (PyObject *self, void* closure
 /* Create a new gdb.RecordInstruction object.  */
 
 PyObject *
-recpy_insn_new (thread_info *thread, enum record_method method, Py_ssize_t number)
+recpy_insn_new (struct thread_info *thread, enum record_method method, Py_ssize_t number)
 {
   recpy_element_object * const obj = PyObject_New (recpy_element_object,
 						   &recpy_insn_type);
@@ -273,7 +273,7 @@ recpy_insn_is_speculative (PyObject *sel
 /* Create a new gdb.RecordFunctionSegment object.  */
 
 PyObject *
-recpy_func_new (thread_info *thread, enum record_method method, Py_ssize_t number)
+recpy_func_new (struct thread_info *thread, enum record_method method, Py_ssize_t number)
 {
   recpy_element_object * const obj = PyObject_New (recpy_element_object,
 						   &recpy_func_type);
Index: gdb-8.2/gdb/python/py-record.h
===================================================================
--- gdb-8.2.orig/gdb/python/py-record.h
+++ gdb-8.2/gdb/python/py-record.h
@@ -30,7 +30,7 @@ typedef struct
   PyObject_HEAD
 
   /* The thread this object refers to.  */
-  thread_info *thread;
+  struct thread_info *thread;
 
   /* The current recording method.  */
   enum record_method method;
@@ -44,7 +44,7 @@ typedef struct
   PyObject_HEAD
 
   /* The thread this object refers to.  */
-  thread_info *thread;
+  struct thread_info *thread;
 
   /* The current recording method.  */
   enum record_method method;
@@ -60,11 +60,11 @@ extern PyTypeObject recpy_insn_type;
 extern PyTypeObject recpy_func_type;
 
 /* Create a new gdb.RecordInstruction object.  */
-extern PyObject *recpy_insn_new (thread_info *thread, enum record_method method,
+extern PyObject *recpy_insn_new (struct thread_info *thread, enum record_method method,
 				 Py_ssize_t number);
 
 /* Create a new gdb.RecordFunctionSegment object.  */
-extern PyObject *recpy_func_new (thread_info *thread, enum record_method method,
+extern PyObject *recpy_func_new (struct thread_info *thread, enum record_method method,
 				 Py_ssize_t number);
 
 /* Create a new gdb.RecordGap object.  */
Index: gdb-8.2/gdb/python/py-record-btrace.c
===================================================================
--- gdb-8.2.orig/gdb/python/py-record-btrace.c
+++ gdb-8.2/gdb/python/py-record-btrace.c
@@ -43,7 +43,7 @@ typedef struct {
   PyObject_HEAD
 
   /* The thread this list belongs to.  */
-  thread_info *thread;
+  struct thread_info *thread;
 
   /* The first index being part of this list.  */
   Py_ssize_t first;
@@ -178,7 +178,7 @@ btpy_insn_or_gap_new (struct thread_info
 /* Create a new gdb.BtraceList object.  */
 
 static PyObject *
-btpy_list_new (thread_info *thread, Py_ssize_t first, Py_ssize_t last, Py_ssize_t step,
+btpy_list_new (struct thread_info *thread, Py_ssize_t first, Py_ssize_t last, Py_ssize_t step,
 	       PyTypeObject *element_type)
 {
   btpy_list_object * const obj = PyObject_New (btpy_list_object,
@@ -654,7 +654,7 @@ PyObject *
 recpy_bt_replay_position (PyObject *self, void *closure)
 {
   const recpy_record_object * const record = (recpy_record_object *) self;
-  thread_info * tinfo = record->thread;
+  struct thread_info * tinfo = record->thread;
 
   if (tinfo == NULL)
     Py_RETURN_NONE;
@@ -673,7 +673,7 @@ PyObject *
 recpy_bt_begin (PyObject *self, void *closure)
 {
   const recpy_record_object * const record = (recpy_record_object *) self;
-  thread_info *const tinfo = record->thread;
+  struct thread_info *const tinfo = record->thread;
   struct btrace_insn_iterator iterator;
 
   if (tinfo == NULL)
@@ -695,7 +695,7 @@ PyObject *
 recpy_bt_end (PyObject *self, void *closure)
 {
   const recpy_record_object * const record = (recpy_record_object *) self;
-  thread_info *const tinfo = record->thread;
+  struct thread_info *const tinfo = record->thread;
   struct btrace_insn_iterator iterator;
 
   if (tinfo == NULL)
@@ -717,7 +717,7 @@ PyObject *
 recpy_bt_instruction_history (PyObject *self, void *closure)
 {
   const recpy_record_object * const record = (recpy_record_object *) self;
-  thread_info *const tinfo = record->thread;
+  struct thread_info *const tinfo = record->thread;
   struct btrace_insn_iterator iterator;
   unsigned long first = 0;
   unsigned long last = 0;
@@ -746,7 +746,7 @@ PyObject *
 recpy_bt_function_call_history (PyObject *self, void *closure)
 {
   const recpy_record_object * const record = (recpy_record_object *) self;
-  thread_info *const tinfo = record->thread;
+  struct thread_info *const tinfo = record->thread;
   struct btrace_call_iterator iterator;
   unsigned long first = 0;
   unsigned long last = 0;
@@ -774,7 +774,7 @@ PyObject *
 recpy_bt_goto (PyObject *self, PyObject *args)
 {
   const recpy_record_object * const record = (recpy_record_object *) self;
-  thread_info *const tinfo = record->thread;
+  struct thread_info *const tinfo = record->thread;
   const recpy_element_object *obj;
 
   if (tinfo == NULL || btrace_is_empty (tinfo))
Index: gdb-8.2/gdb/python/python-internal.h
===================================================================
--- gdb-8.2.orig/gdb/python/python-internal.h
+++ gdb-8.2/gdb/python/python-internal.h
@@ -534,7 +534,7 @@ PyObject *gdbpy_lookup_objfile (PyObject
 PyObject *gdbarch_to_arch_object (struct gdbarch *gdbarch);
 
 thread_object *create_thread_object (struct thread_info *tp);
-thread_object *thread_to_thread_object (thread_info *thr)
+thread_object *thread_to_thread_object (struct thread_info *thr)
   CPYCHECKER_RETURNS_BORROWED_REF;
 inferior_object *inferior_to_inferior_object (inferior *inf);
 
Index: gdb-8.2/gdb/python/py-threadevent.c
===================================================================
--- gdb-8.2.orig/gdb/python/py-threadevent.c
+++ gdb-8.2/gdb/python/py-threadevent.c
@@ -29,7 +29,7 @@ py_get_event_thread (ptid_t ptid)
 
   if (non_stop)
     {
-      thread_info *thread = find_thread_ptid (ptid);
+      struct thread_info *thread = find_thread_ptid (ptid);
       if (thread != nullptr)
 	pythread = (PyObject *) thread_to_thread_object (thread);
     }
Index: gdb-8.2/gdb/ravenscar-thread.c
===================================================================
--- gdb-8.2.orig/gdb/ravenscar-thread.c
+++ gdb-8.2/gdb/ravenscar-thread.c
@@ -388,7 +388,7 @@ ravenscar_active_task (int cpu)
 }
 
 const char *
-ravenscar_thread_target::extra_thread_info (thread_info *tp)
+ravenscar_thread_target::extra_thread_info (struct thread_info *tp)
 {
   return "Ravenscar task";
 }
Index: gdb-8.2/gdb/record-btrace.c
===================================================================
--- gdb-8.2.orig/gdb/record-btrace.c
+++ gdb-8.2/gdb/record-btrace.c
@@ -250,7 +250,7 @@ require_btrace_thread (void)
   if (inferior_ptid == null_ptid)
     error (_("No thread."));
 
-  thread_info *tp = inferior_thread ();
+  struct thread_info *tp = inferior_thread ();
 
   validate_registers_access ();
 
@@ -353,11 +353,11 @@ struct scoped_btrace_disable
 
   ~scoped_btrace_disable ()
   {
-    for (thread_info *tp : m_threads)
+    for (struct thread_info *tp : m_threads)
       btrace_disable (tp);
   }
 
-  void add_thread (thread_info *thread)
+  void add_thread (struct thread_info *thread)
   {
     m_threads.push_front (thread);
   }
@@ -368,7 +368,7 @@ struct scoped_btrace_disable
   }
 
 private:
-  std::forward_list<thread_info *> m_threads;
+  std::forward_list<struct thread_info *> m_threads;
 };
 
 /* Open target record-btrace.  */
@@ -2513,8 +2513,8 @@ record_btrace_step_thread (struct thread
 
 static void
 record_btrace_maybe_mark_async_event
-  (const std::vector<thread_info *> &moving,
-   const std::vector<thread_info *> &no_history)
+  (const std::vector<struct thread_info *> &moving,
+   const std::vector<struct thread_info *> &no_history)
 {
   bool more_moving = !moving.empty ();
   bool more_no_history = !no_history.empty ();;
@@ -2537,8 +2537,8 @@ ptid_t
 record_btrace_target::wait (ptid_t ptid, struct target_waitstatus *status,
 			    int options)
 {
-  std::vector<thread_info *> moving;
-  std::vector<thread_info *> no_history;
+  std::vector<struct thread_info *> moving;
+  std::vector<struct thread_info *> no_history;
 
   DEBUG ("wait %s (0x%x)", target_pid_to_str (ptid), options);
 
@@ -2551,7 +2551,7 @@ record_btrace_target::wait (ptid_t ptid,
 
   /* Keep a work list of moving threads.  */
   {
-    thread_info *tp;
+    struct thread_info *tp;
 
     ALL_NON_EXITED_THREADS (tp)
       {
@@ -2593,7 +2593,7 @@ record_btrace_target::wait (ptid_t ptid,
     {
       for (unsigned int ix = 0; eventing == NULL && ix < moving.size ();)
 	{
-	  thread_info *tp = moving[ix];
+	  struct thread_info *tp = moving[ix];
 
 	  *status = record_btrace_step_thread (tp);
 
@@ -2640,7 +2640,7 @@ record_btrace_target::wait (ptid_t ptid,
   /* Stop all other threads. */
   if (!target_is_non_stop_p ())
     {
-      thread_info *tp;
+      struct thread_info *tp;
 
       ALL_NON_EXITED_THREADS (tp)
 	record_btrace_cancel_resume (tp);
Index: gdb-8.2/gdb/regcache.c
===================================================================
--- gdb-8.2.orig/gdb/regcache.c
+++ gdb-8.2/gdb/regcache.c
@@ -394,7 +394,7 @@ get_thread_regcache (ptid_t ptid)
 /* See regcache.h.  */
 
 struct regcache *
-get_thread_regcache (thread_info *thread)
+get_thread_regcache (struct thread_info *thread)
 {
   return get_thread_regcache (thread->ptid);
 }
@@ -478,7 +478,7 @@ registers_changed_ptid (ptid_t ptid)
 /* See regcache.h.  */
 
 void
-registers_changed_thread (thread_info *thread)
+registers_changed_thread (struct thread_info *thread)
 {
   registers_changed_ptid (thread->ptid);
 }
@@ -1575,7 +1575,7 @@ cooked_read_test (struct gdbarch *gdbarc
   address_space mock_aspace {};
   mock_inferior.gdbarch = gdbarch;
   mock_inferior.aspace = &mock_aspace;
-  thread_info mock_thread (&mock_inferior, mock_ptid);
+  struct thread_info mock_thread (&mock_inferior, mock_ptid);
 
   scoped_restore restore_thread_list
     = make_scoped_restore (&thread_list, &mock_thread);
Index: gdb-8.2/gdb/regcache.h
===================================================================
--- gdb-8.2.orig/gdb/regcache.h
+++ gdb-8.2/gdb/regcache.h
@@ -21,6 +21,7 @@
 #define REGCACHE_H
 
 #include "common-regcache.h"
+#include "function-view.h"
 #include <forward_list>
 
 struct regcache;
@@ -32,7 +33,7 @@ extern struct regcache *get_current_regc
 extern struct regcache *get_thread_regcache (ptid_t ptid);
 
 /* Get the regcache of THREAD.  */
-extern struct regcache *get_thread_regcache (thread_info *thread);
+extern struct regcache *get_thread_regcache (struct thread_info *thread);
 
 extern struct regcache *get_thread_arch_regcache (ptid_t, struct gdbarch *);
 extern struct regcache *get_thread_arch_aspace_regcache (ptid_t,
@@ -436,7 +437,7 @@ extern void registers_changed_ptid (ptid
 
 /* Indicate that registers of THREAD may have changed, so invalidate
    the cache.  */
-extern void registers_changed_thread (thread_info *thread);
+extern void registers_changed_thread (struct thread_info *thread);
 
 /* An abstract base class for register dump.  */
 
Index: gdb-8.2/gdb/remote.c
===================================================================
--- gdb-8.2.orig/gdb/remote.c
+++ gdb-8.2/gdb/remote.c
@@ -495,7 +495,7 @@ public:
 
   ptid_t get_ada_task_ptid (long lwp, long thread) override;
 
-  thread_info *thread_handle_to_thread_info (const gdb_byte *thread_handle,
+  struct thread_info *thread_handle_to_thread_info (const gdb_byte *thread_handle,
 					     int handle_len,
 					     inferior *inf) override;
 
@@ -758,7 +758,7 @@ public: /* Remote specific methods.  */
 
   void process_initial_stop_replies (int from_tty);
 
-  thread_info *remote_add_thread (ptid_t ptid, bool running, bool executing);
+  struct thread_info *remote_add_thread (ptid_t ptid, bool running, bool executing);
 
   void btrace_sync_conf (const btrace_config *conf);
 
@@ -2379,7 +2379,7 @@ static remote_thread_info *get_remote_th
 /* Add thread PTID to GDB's thread list.  Tag it as executing/running
    according to RUNNING.  */
 
-thread_info *
+struct thread_info *
 remote_target::remote_add_thread (ptid_t ptid, bool running, bool executing)
 {
   struct remote_state *rs = get_remote_state ();
@@ -2421,7 +2421,7 @@ remote_target::remote_notice_new_inferio
   /* If this is a new thread, add it to GDB's thread list.
      If we leave it up to WFI to do this, bad things will happen.  */
 
-  thread_info *tp = find_thread_ptid (currthread);
+  struct thread_info *tp = find_thread_ptid (currthread);
   if (tp != NULL && tp->state == THREAD_EXITED)
     {
       /* We're seeing an event on a thread id we knew had exited.
@@ -2478,7 +2478,7 @@ remote_target::remote_notice_new_inferio
 	}
 
       /* This is really a new thread.  Add it.  */
-      thread_info *new_thr
+      struct thread_info *new_thr
 	= remote_add_thread (currthread, running, executing);
 
       /* If we found a new inferior, let the common code do whatever
@@ -2511,7 +2511,7 @@ get_remote_thread_info (struct thread_in
 static remote_thread_info *
 get_remote_thread_info (ptid_t ptid)
 {
-  thread_info *thr = find_thread_ptid (ptid);
+  struct thread_info *thr = find_thread_ptid (ptid);
   return get_remote_thread_info (thr);
 }
 
@@ -3797,7 +3797,7 @@ remote_target::update_thread_list ()
 
 	      remote_notice_new_inferior (item.ptid, executing);
 
-	      thread_info *tp = find_thread_ptid (item.ptid);
+	      struct thread_info *tp = find_thread_ptid (item.ptid);
 	      remote_thread_info *info = get_remote_thread_info (tp);
 	      info->core = item.core;
 	      info->extra = std::move (item.extra);
@@ -3827,7 +3827,7 @@ remote_target::update_thread_list ()
  */
 
 const char *
-remote_target::extra_thread_info (thread_info *tp)
+remote_target::extra_thread_info (struct thread_info *tp)
 {
   struct remote_state *rs = get_remote_state ();
   int set;
@@ -5872,7 +5872,7 @@ extended_remote_target::attach (const ch
       inferior_ptid = remote_current_thread (inferior_ptid);
 
       /* Add the main thread to the thread list.  */
-      thread_info *thr = add_thread_silent (inferior_ptid);
+      struct thread_info *thr = add_thread_silent (inferior_ptid);
       /* Don't consider the thread stopped until we've processed the
 	 saved stop reply.  */
       set_executing (thr->ptid, true);
@@ -13969,7 +13969,7 @@ remote_target::execution_direction ()
 /* Return pointer to the thread_info struct which corresponds to
    THREAD_HANDLE (having length HANDLE_LEN).  */
 
-thread_info *
+struct thread_info *
 remote_target::thread_handle_to_thread_info (const gdb_byte *thread_handle,
 					     int handle_len,
 					     inferior *inf)
Index: gdb-8.2/gdb/s390-linux-tdep.c
===================================================================
--- gdb-8.2.orig/gdb/s390-linux-tdep.c
+++ gdb-8.2/gdb/s390-linux-tdep.c
@@ -558,7 +558,7 @@ static const struct frame_unwind s390_si
 
 static LONGEST
 s390_linux_get_syscall_number (struct gdbarch *gdbarch,
-			       thread_info *thread)
+			       struct thread_info *thread)
 {
   struct regcache *regs = get_thread_regcache (thread);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
Index: gdb-8.2/gdb/sparc64-linux-tdep.c
===================================================================
--- gdb-8.2.orig/gdb/sparc64-linux-tdep.c
+++ gdb-8.2/gdb/sparc64-linux-tdep.c
@@ -282,7 +282,7 @@ sparc64_linux_write_pc (struct regcache
 
 static LONGEST
 sparc64_linux_get_syscall_number (struct gdbarch *gdbarch,
-				  thread_info *thread)
+				  struct thread_info *thread)
 {
   struct regcache *regcache = get_thread_regcache (thread);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
Index: gdb-8.2/gdb/sparc-linux-tdep.c
===================================================================
--- gdb-8.2.orig/gdb/sparc-linux-tdep.c
+++ gdb-8.2/gdb/sparc-linux-tdep.c
@@ -274,7 +274,7 @@ sparc_linux_write_pc (struct regcache *r
 
 static LONGEST
 sparc32_linux_get_syscall_number (struct gdbarch *gdbarch,
-				  thread_info *thread)
+				  struct thread_info *thread)
 {
   struct regcache *regcache = get_thread_regcache (thread);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
Index: gdb-8.2/gdb/target.c
===================================================================
--- gdb-8.2.orig/gdb/target.c
+++ gdb-8.2/gdb/target.c
@@ -2025,7 +2025,7 @@ target_pre_inferior (int from_tty)
 static int
 dispose_inferior (struct inferior *inf, void *args)
 {
-  thread_info *thread = any_thread_of_inferior (inf);
+  struct thread_info *thread = any_thread_of_inferior (inf);
   if (thread != NULL)
     {
       switch_to_thread (thread);
Index: gdb-8.2/gdb/target.h
===================================================================
--- gdb-8.2.orig/gdb/target.h
+++ gdb-8.2/gdb/target.h
@@ -649,11 +649,11 @@ struct target_ops
       TARGET_DEFAULT_IGNORE ();
     virtual const char *pid_to_str (ptid_t)
       TARGET_DEFAULT_FUNC (default_pid_to_str);
-    virtual const char *extra_thread_info (thread_info *)
+    virtual const char *extra_thread_info (struct thread_info *)
       TARGET_DEFAULT_RETURN (NULL);
-    virtual const char *thread_name (thread_info *)
+    virtual const char *thread_name (struct thread_info *)
       TARGET_DEFAULT_RETURN (NULL);
-    virtual thread_info *thread_handle_to_thread_info (const gdb_byte *,
+    virtual struct thread_info *thread_handle_to_thread_info (const gdb_byte *,
 						       int,
 						       inferior *inf)
       TARGET_DEFAULT_RETURN (NULL);
Index: gdb-8.2/gdb/thread.c
===================================================================
--- gdb-8.2.orig/gdb/thread.c
+++ gdb-8.2/gdb/thread.c
@@ -281,7 +281,7 @@ add_thread_silent (ptid_t ptid)
 
       if (inferior_ptid == ptid)
 	{
-	  thread_info *new_thr = new_thread (inf, null_ptid);
+	  struct thread_info *new_thr = new_thread (inf, null_ptid);
 
 	  /* Make switch_to_thread not read from the thread.  */
 	  new_thr->state = THREAD_EXITED;
@@ -436,7 +436,7 @@ thread_step_over_chain_remove (struct th
    exit.  */
 
 static void
-delete_thread_1 (thread_info *thr, bool silent)
+delete_thread_1 (struct thread_info *thr, bool silent)
 {
   struct thread_info *tp, *tpprev;
 
@@ -471,13 +471,13 @@ delete_thread_1 (thread_info *thr, bool
    it.  */
 
 void
-delete_thread (thread_info *thread)
+delete_thread (struct thread_info *thread)
 {
   delete_thread_1 (thread, false /* not silent */);
 }
 
 void
-delete_thread_silent (thread_info *thread)
+delete_thread_silent (struct thread_info *thread)
 {
   delete_thread_1 (thread, true /* silent */);
 }
@@ -613,7 +613,7 @@ in_thread_list (ptid_t ptid)
 
 /* Finds the first thread of the inferior.  */
 
-thread_info *
+struct thread_info *
 first_thread_of_inferior (inferior *inf)
 {
   struct thread_info *tp, *ret = NULL;
@@ -626,7 +626,7 @@ first_thread_of_inferior (inferior *inf)
   return ret;
 }
 
-thread_info *
+struct thread_info *
 any_thread_of_inferior (inferior *inf)
 {
   struct thread_info *tp;
@@ -644,7 +644,7 @@ any_thread_of_inferior (inferior *inf)
   return NULL;
 }
 
-thread_info *
+struct thread_info *
 any_live_thread_of_inferior (inferior *inf)
 {
   struct thread_info *curr_tp = NULL;
@@ -727,7 +727,7 @@ delete_exited_threads (void)
    TP.  */
 
 bool
-thread_stack_temporaries_enabled_p (thread_info *tp)
+thread_stack_temporaries_enabled_p (struct thread_info *tp)
 {
   if (tp == NULL)
     return false;
@@ -738,7 +738,7 @@ thread_stack_temporaries_enabled_p (thre
 /* Push V on to the stack temporaries of the thread with id PTID.  */
 
 void
-push_thread_stack_temporary (thread_info *tp, struct value *v)
+push_thread_stack_temporary (struct thread_info *tp, struct value *v)
 {
   gdb_assert (tp != NULL && tp->stack_temporaries_enabled);
   tp->stack_temporaries.push_back (v);
@@ -748,7 +748,7 @@ push_thread_stack_temporary (thread_info
    TP.  Return false otherwise.  */
 
 bool
-value_in_thread_stack_temporaries (struct value *val, thread_info *tp)
+value_in_thread_stack_temporaries (struct value *val, struct thread_info *tp)
 {
   gdb_assert (tp != NULL && tp->stack_temporaries_enabled);
   for (value *v : tp->stack_temporaries)
@@ -762,7 +762,7 @@ value_in_thread_stack_temporaries (struc
    Return NULL if there are no stack temporaries for the thread.  */
 
 value *
-get_last_thread_stack_temporary (thread_info *tp)
+get_last_thread_stack_temporary (struct thread_info *tp)
 {
   struct value *lastval = NULL;
 
@@ -923,7 +923,7 @@ is_executing (ptid_t ptid)
    stop_pc.  */
 
 static void
-set_executing_thread (thread_info *thr, bool executing)
+set_executing_thread (struct thread_info *thr, bool executing)
 {
   thr->executing = executing;
   if (executing)
@@ -1037,7 +1037,7 @@ validate_registers_access (void)
   if (inferior_ptid == null_ptid)
     error (_("No thread selected."));
 
-  thread_info *tp = inferior_thread ();
+  struct thread_info *tp = inferior_thread ();
 
   /* Don't try to read from a dead thread.  */
   if (tp->state == THREAD_EXITED)
@@ -1055,7 +1055,7 @@ validate_registers_access (void)
 /* See gdbthread.h.  */
 
 bool
-can_access_registers_thread (thread_info *thread)
+can_access_registers_thread (struct thread_info *thread)
 {
   /* No thread, no registers.  */
   if (thread == NULL)
@@ -1123,7 +1123,7 @@ should_print_thread (const char *request
    column, for TP.  */
 
 static std::string
-thread_target_id_str (thread_info *tp)
+thread_target_id_str (struct thread_info *tp)
 {
   const char *target_id = target_pid_to_str (tp->ptid);
   const char *extra_info = target_extra_thread_info (tp);
@@ -1159,7 +1159,7 @@ print_thread_info_1 (struct ui_out *uiou
   /* Whether the current thread is exited.  */
   bool current_exited = false;
 
-  thread_info *current_thread = (inferior_ptid != null_ptid
+  struct thread_info *current_thread = (inferior_ptid != null_ptid
 				 ? inferior_thread () : NULL);
 
   {
@@ -1378,7 +1378,7 @@ switch_to_no_thread ()
 /* See gdbthread.h.  */
 
 void
-switch_to_thread (thread_info *thr)
+switch_to_thread (struct thread_info *thr)
 {
   gdb_assert (thr != NULL);
 
@@ -1395,7 +1395,7 @@ switch_to_thread (thread_info *thr)
 void
 switch_to_thread (ptid_t ptid)
 {
-  thread_info *thr = find_thread_ptid (ptid);
+  struct thread_info *thr = find_thread_ptid (ptid);
   switch_to_thread (thr);
 }
 
@@ -1498,7 +1498,7 @@ scoped_restore_current_thread::scoped_re
 
   if (inferior_ptid != null_ptid)
     {
-      thread_info *tp = inferior_thread ();
+      struct thread_info *tp = inferior_thread ();
       struct frame_info *frame;
 
       m_was_stopped = tp->state == THREAD_STOPPED;
@@ -1962,7 +1962,7 @@ thread_num_make_value_helper (struct gdb
     int_val = 0;
   else
     {
-      thread_info *tp = inferior_thread ();
+      struct thread_info *tp = inferior_thread ();
       if (global)
 	int_val = tp->global_num;
       else
Index: gdb-8.2/gdb/top.c
===================================================================
--- gdb-8.2.orig/gdb/top.c
+++ gdb-8.2/gdb/top.c
@@ -1504,7 +1504,7 @@ kill_or_detach (struct inferior *inf, vo
   if (inf->pid == 0)
     return 0;
 
-  thread_info *thread = any_thread_of_inferior (inf);
+  struct thread_info *thread = any_thread_of_inferior (inf);
   if (thread != NULL)
     {
       switch_to_thread (thread);
Index: gdb-8.2/gdb/varobj.c
===================================================================
--- gdb-8.2.orig/gdb/varobj.c
+++ gdb-8.2/gdb/varobj.c
@@ -2122,7 +2122,7 @@ value_of_root_1 (struct varobj **var_han
     }
   else
     {
-      thread_info *thread = find_thread_global_id (var->root->thread_id);
+      struct thread_info *thread = find_thread_global_id (var->root->thread_id);
 
       if (thread != NULL)
 	{
Index: gdb/gdb/gnu-nat.c
===================================================================
--- gdb.orig/gdb/gnu-nat.c
+++ gdb/gdb/gnu-nat.c
@@ -67,6 +67,7 @@ extern "C"
 #include "gdb_obstack.h"
 #include "tid-parse.h"
 
+#include "nat/fork-inferior.h"
 #include "gnu-nat.h"
 #include "inf-child.h"
 
@@ -1872,22 +1873,28 @@ S_proc_wait_reply (mach_port_t reply, ke
   return 0;
 }
 
+/* Note: The third argument to S_proc_getmsgport_reply, S_proc_task2proc_reply and
+   S_proc_pid2proc_reply is of type mach_port_poly_t. Look at gdb/process_reply_S.h
+   derived from process_reply.defs to find out the fourth argument */
+
 ILL_RPC (S_proc_setmsgport_reply,
 	 mach_port_t reply_port, kern_return_t return_code,
 	 mach_port_t oldmsgport)
 ILL_RPC (S_proc_getmsgport_reply,
 	 mach_port_t reply_port, kern_return_t return_code,
-	 mach_port_t msgports)
+	 mach_port_t msgports, mach_msg_type_name_t msgportsPoly)
 ILL_RPC (S_proc_pid2task_reply,
 	 mach_port_t reply_port, kern_return_t return_code, mach_port_t task)
 ILL_RPC (S_proc_task2pid_reply,
 	 mach_port_t reply_port, kern_return_t return_code, pid_t pid)
 ILL_RPC (S_proc_task2proc_reply,
-	 mach_port_t reply_port, kern_return_t return_code, mach_port_t proc)
+	 mach_port_t reply_port, kern_return_t return_code, mach_port_t proc,
+	 mach_msg_type_name_t procPoly)
 ILL_RPC (S_proc_proc2task_reply,
 	 mach_port_t reply_port, kern_return_t return_code, mach_port_t task)
 ILL_RPC (S_proc_pid2proc_reply,
-	 mach_port_t reply_port, kern_return_t return_code, mach_port_t proc)
+	 mach_port_t reply_port, kern_return_t return_code, mach_port_t proc,
+	 mach_msg_type_name_t procPoly)
 ILL_RPC (S_proc_getprocinfo_reply,
 	 mach_port_t reply_port, kern_return_t return_code,
 	 int flags, procinfo_t procinfo, mach_msg_type_number_t procinfoCnt,
@@ -2358,7 +2365,7 @@ gnu_write_inferior (task_t task, CORE_AD
   mach_msg_type_number_t copy_count;
   int deallocate = 0;
 
-  char *errstr = "Bug in gnu_write_inferior";
+  const char *errstr = "Bug in gnu_write_inferior";
 
   struct vm_region_list *region_element;
   struct vm_region_list *region_head = NULL;
@@ -2775,7 +2782,7 @@ show_thread_default_cmd (const char *arg
 }
 
 static int
-parse_int_arg (const char *args, char *cmd_prefix)
+parse_int_arg (const char *args, const char *cmd_prefix)
 {
   if (args)
     {
@@ -2790,7 +2797,7 @@ parse_int_arg (const char *args, char *c
 }
 
 static int
-_parse_bool_arg (const char *args, char *t_val, char *f_val, char *cmd_prefix)
+_parse_bool_arg (const char *args, const char *t_val, const char *f_val, const char *cmd_prefix)
 {
   if (!args || strcmp (args, t_val) == 0)
     return 1;
@@ -2806,7 +2813,7 @@ _parse_bool_arg (const char *args, char
   _parse_bool_arg (args, "on", "off", cmd_prefix)
 
 static void
-check_empty (const char *args, char *cmd_prefix)
+check_empty (const char *args, const char *cmd_prefix)
 {
   if (args)
     error (_("Garbage after \"%s\" command: `%s'"), cmd_prefix, args);

Attachment: series
Description: Text document

Attachment: series.orig
Description: Text document

Description: Patch out a PATH_MAX usage, for Hurd's benefit

Author: Svante Signell <svante.signell@gmail.com>
Bug-Debian: http://bugs.debian.org/709508
Forwarded: http://sourceware.org/ml/gdb-patches/2013-05/msg00878.html
Reviewed-By: Héctor Orón Martínez <zumbi@debian.org>
Last-Update: 2013-06-08

Index: gdb/gdb/nto-tdep.c
===================================================================
--- gdb.orig/gdb/nto-tdep.c	2017-06-04 20:17:55.347905828 +0200
+++ gdb/gdb/nto-tdep.c	2017-06-04 20:17:55.343905913 +0200
@@ -153,10 +153,12 @@
 void
 nto_init_solib_absolute_prefix (void)
 {
-  char buf[PATH_MAX * 2], arch_path[PATH_MAX];
+  char *buf, *arch_path;
   char *nto_root;
   const char *endian;
   const char *arch;
+  int arch_len, len;
+#define FMT "set solib-absolute-prefix %s"
 
   nto_root = nto_target ();
   if (strcmp (gdbarch_bfd_arch_info (target_gdbarch ())->arch_name, "i386") == 0)
@@ -179,9 +181,13 @@
 	       == BFD_ENDIAN_BIG ? "be" : "le";
     }
 
-  xsnprintf (arch_path, sizeof (arch_path), "%s/%s%s", nto_root, arch, endian);
+  arch_len = strlen (nto_root) + 1 + strlen (arch) + strlen (endian) + 1;
+  arch_path = alloca (arch_len);
+  xsnprintf (arch_path, arch_len, "%s/%s%s", nto_root, arch, endian);
 
-  xsnprintf (buf, sizeof (buf), "set solib-absolute-prefix %s", arch_path);
+  len = strlen (FMT) - 2 + strlen (arch_path) + 1;
+  buf =  alloca (len);
+  xsnprintf (buf, len, FMT, arch_path);
   execute_command (buf, 0);
 }
 
Index: gdb/gdb/thread.c
===================================================================
--- gdb.orig/gdb/thread.c
+++ gdb/gdb/thread.c
@@ -68,21 +68,21 @@ static int thread_alive (struct thread_i
 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;
 };
 
 
@@ -199,7 +199,7 @@ clear_thread_inferior_resources (struct
 /* Set the TP's state as exited.  */
 
 static void
-set_thread_exited (thread_info *tp, int silent)
+set_thread_exited (struct thread_info *tp, int silent)
 {
   /* Dead threads don't need to step-over.  Remove from queue.  */
   if (tp->step_over_next != NULL)
@@ -242,7 +242,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 (thread_list == NULL)
     thread_list = tp;
@@ -1567,7 +1567,7 @@ static bool tp_array_compar_ascending;
    order is determined by TP_ARRAY_COMPAR_ASCENDING.  */
 
 static bool
-tp_array_compar (const thread_info *a, const thread_info *b)
+tp_array_compar (const struct thread_info *a, const struct thread_info *b)
 {
   if (a->inf->num != b->inf->num)
     {
@@ -1615,11 +1615,11 @@ 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);
 
       {
-	thread_info *tp;
+	struct thread_info *tp;
 
 	ALL_NON_EXITED_THREADS (tp)
 	  {
@@ -1637,7 +1637,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 (thread_alive (thr))
 	  {
 	    switch_to_thread (thr);
@@ -1868,7 +1868,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 (!thread_alive (tp))
     error (_("Thread ID %s has terminated."), tidstr);
Index: gdb/gdb/breakpoint.c
===================================================================
--- gdb.orig/gdb/breakpoint.c
+++ gdb/gdb/breakpoint.c
@@ -12771,7 +12771,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
@@ -663,7 +663,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;
@@ -913,7 +913,7 @@ set_step_frame (void)
   set_step_info (frame, sal);
 
   CORE_ADDR pc = get_frame_pc (frame);
-  thread_info *tp = inferior_thread ();
+  struct thread_info *tp = inferior_thread ();
   tp->control.step_start_function = find_pc_function (pc);
 }
 
Index: gdb/gdb/progspace-and-thread.c
===================================================================
--- gdb.orig/gdb/progspace-and-thread.c
+++ gdb/gdb/progspace-and-thread.c
@@ -28,7 +28,7 @@ switch_to_program_space_and_thread (prog
 
   if (inf != NULL && 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/remote.c
===================================================================
--- gdb.orig/gdb/remote.c
+++ gdb/gdb/remote.c
@@ -2373,7 +2373,7 @@ remote_target::remote_add_inferior (int
   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 (ptid_t ptid);
 
 /* Add thread PTID to GDB's thread list.  Tag it as executing/running
@@ -2498,7 +2498,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);
 
@@ -4315,7 +4315,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 (curr_ptid);
+  struct thread_info *tp = add_thread_silent (curr_ptid);
   switch_to_thread_no_regs (tp);
 }
 
Index: gdb/gdb/linux-tdep.c
===================================================================
--- gdb.orig/gdb/linux-tdep.c
+++ gdb/gdb/linux-tdep.c
@@ -1652,7 +1652,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
@@ -554,7 +554,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/python/py-record-btrace.c
===================================================================
--- gdb.orig/gdb/python/py-record-btrace.c
+++ gdb/gdb/python/py-record-btrace.c
@@ -72,7 +72,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)
@@ -115,7 +115,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)
@@ -153,7 +153,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;
@@ -339,7 +339,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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]