/* Fork a Unix child process, and set up to debug it, for GDB.
- Copyright (C) 1990-2016 Free Software Foundation, Inc.
+ Copyright (C) 1990-2017 Free Software Foundation, Inc.
Contributed by Cygnus Support.
return 0;
}
+/* See inferior.h. */
+
+void
+trace_start_error (const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start (ap, fmt);
+ fprintf_unfiltered (gdb_stderr, "Could not trace the inferior "
+ "process.\nError: ");
+ vfprintf_unfiltered (gdb_stderr, fmt, ap);
+ va_end (ap);
+
+ gdb_flush (gdb_stderr);
+ _exit (0177);
+}
+
+/* See inferior.h. */
+
+void
+trace_start_error_with_name (const char *string)
+{
+ trace_start_error ("%s: %s", string, safe_strerror (errno));
+}
+
/* Start an inferior Unix child process and sets inferior_ptid to its
pid. EXEC_FILE is the file to run. ALLARGS is a string containing
the arguments to the program. ENV is the environment vector to
case TARGET_WAITKIND_SIGNALLED:
target_terminal_ours ();
- target_mourn_inferior ();
+ target_mourn_inferior (event_ptid);
error (_("During startup program terminated with signal %s, %s."),
gdb_signal_to_name (ws.value.sig),
gdb_signal_to_string (ws.value.sig));
case TARGET_WAITKIND_EXITED:
target_terminal_ours ();
- target_mourn_inferior ();
+ target_mourn_inferior (event_ptid);
if (ws.value.integer)
error (_("During startup program exited with code %d."),
ws.value.integer);