Share fork_inferior et al with gdbserver
[deliverable/binutils-gdb.git] / gdb / procfs.c
index adb2e84632694692940e03243ed83d88381fd473..b03809c7b7154b190f63768b78aa72b71a627956 100644 (file)
@@ -4377,7 +4377,7 @@ procfs_init_inferior (struct target_ops *ops, int pid)
   thread_change_ptid (pid_to_ptid (pid),
                      ptid_build (pid, lwpid, 0));
 
-  startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
+  gdb_startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED);
 
 #ifdef SYS_syssgi
   /* On mips-irix, we need to stop the inferior early enough during
@@ -4604,6 +4604,11 @@ procfs_create_inferior (struct target_ops *ops, const char *exec_file,
   pid = fork_inferior (exec_file, allargs, env, procfs_set_exec_trap,
                       NULL, NULL, shell_file, NULL);
 
+  /* We have something that executes now.  We'll be running through
+     the shell at this point (if startup-with-shell is true), but the
+     pid shouldn't change.  */
+  add_thread_silent (pid_to_ptid (pid));
+
   procfs_init_inferior (ops, pid);
 }
 
This page took 0.027054 seconds and 4 git commands to generate.