ubsan: visium: left shift cannot be represented in type 'int'
[deliverable/binutils-gdb.git] / gdb / fork-child.c
index eb884a7d09e578d09e90532aa3f8b91dcae12c06..edfb6a3c5a1cd0cec3e94b44ee9b0f2fe7275af2 100644 (file)
@@ -1,6 +1,6 @@
 /* Fork a Unix child process, and set up to debug it, for GDB.
 
-   Copyright (C) 1990-2017 Free Software Foundation, Inc.
+   Copyright (C) 1990-2019 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
 #include "terminal.h"
 #include "gdbthread.h"
 #include "top.h"
-#include "job-control.h"
-#include "filestuff.h"
+#include "gdbsupport/job-control.h"
+#include "gdbsupport/filestuff.h"
 #include "nat/fork-inferior.h"
-#include "common/common-inferior.h"
+#include "gdbsupport/common-inferior.h"
 
 /* The exec-wrapper, if any, that will be used when starting the
    inferior.  */
 
 static char *exec_wrapper = NULL;
 
-/* See common/common-inferior.h.  */
+/* See gdbsupport/common-inferior.h.  */
 
 const char *
 get_exec_wrapper ()
@@ -78,17 +78,12 @@ prefork_hook (const char *args)
 void
 postfork_hook (pid_t pid)
 {
-  struct inferior *inf;
-
-  if (!have_inferiors ())
-    init_thread_list ();
-
-  inf = current_inferior ();
+  inferior *inf = current_inferior ();
 
   inferior_appeared (inf, pid);
 
   /* Needed for wait_for_inferior stuff.  */
-  inferior_ptid = pid_to_ptid (pid);
+  inferior_ptid = ptid_t (pid);
 
   gdb_assert (saved_ui != NULL);
   current_ui = saved_ui;
This page took 0.024999 seconds and 4 git commands to generate.