Multi-target support
[deliverable/binutils-gdb.git] / gdb / nat / fork-inferior.h
index 10e383299c616109f42726e1d0ed14d80cfac7af..9cbe9bd19d5a3b00591fa7b8efdc320550d29278 100644 (file)
@@ -1,6 +1,6 @@
 /* Functions and data responsible for forking the inferior process.
 
-   Copyright (C) 1986-2017 Free Software Foundation, Inc.
+   Copyright (C) 1986-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef FORK_INFERIOR_H
-#define FORK_INFERIOR_H
+#ifndef NAT_FORK_INFERIOR_H
+#define NAT_FORK_INFERIOR_H
 
 #include <string>
 
+struct process_stratum_target;
+
 /* Number of traps that happen between exec'ing the shell to run an
    inferior and when we finally get to the inferior code, not counting
    the exec for the shell.  This is 1 on all supported
@@ -50,30 +52,11 @@ extern pid_t fork_inferior (const char *exec_file_arg,
 /* Accept NTRAPS traps from the inferior.
 
    Return the ptid of the inferior being started.  */
-extern ptid_t startup_inferior (pid_t pid, int ntraps,
+extern ptid_t startup_inferior (process_stratum_target *proc_target,
+                               pid_t pid, int ntraps,
                                struct target_waitstatus *mystatus,
                                ptid_t *myptid);
 
-/* Whether to start up the debuggee under a shell.
-
-   If startup-with-shell is set, GDB's "run" will attempt to start up
-   the debuggee under a shell.  This also happens when using GDBserver
-   under extended remote mode.
-
-   This is in order for argument-expansion to occur.  E.g.,
-
-   (gdb) run *
-
-   The "*" gets expanded by the shell into a list of files.
-
-   While this is a nice feature, it may be handy to bypass the shell
-   in some cases.  To disable this feature, do "set startup-with-shell
-   false".
-
-   The catch-exec traps expected during start-up will be one more if
-   the target is started up with a shell.  */
-extern int startup_with_shell;
-
 /* Perform any necessary tasks before a fork/vfork takes place.  ARGS
    is a string containing all the arguments received by the inferior.
    This function is mainly used by fork_inferior.  */
@@ -95,7 +78,7 @@ extern void gdb_flush_out_err ();
    (i.e., when the "traceme_fun" callback is called on fork_inferior)
    and bail out.  This function does not return.  */
 extern void trace_start_error (const char *fmt, ...)
-  ATTRIBUTE_NORETURN;
+  ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
 
 /* Like "trace_start_error", but the error message is constructed by
    combining STRING with the system error message for errno.  This
@@ -103,4 +86,4 @@ extern void trace_start_error (const char *fmt, ...)
 extern void trace_start_error_with_name (const char *string)
   ATTRIBUTE_NORETURN;
 
-#endif /* FORK_INFERIOR_H */
+#endif /* NAT_FORK_INFERIOR_H */
This page took 0.03122 seconds and 4 git commands to generate.