+2004-05-25 Andrew Cagney <cagney@gnu.org>
+
+ * target.h (struct target_ops): Add from_tty to
+ to_create_inferior.
+ (target_create_inferior, find_default_create_inferior): Update.
+ * infcmd.c (run_command): Update.
+ * wince.c (child_create_inferior): Update.
+ * win32-nat.c (child_create_inferior): Update.
+ * uw-thread.c (uw_thread_create_inferior): Update.
+ * thread-db.c (thread_db_create_inferior): Update.
+ * target.c (debug_to_create_inferior)
+ (find_default_create_inferior): Update.
+ (maybe_kill_then_create_inferior): Update.
+ * sol-thread.c (sol_thread_create_inferior): Update.
+ * remote.c (extended_remote_async_create_inferior)
+ (extended_remote_create_inferior): Update.
+ * remote-vx.c (vx_create_inferior): Update.
+ * remote-st.c (st2000_create_inferior): Update.
+ * remote-sim.c (gdbsim_create_inferior): Update.
+ * remote-sds.c (sds_create_inferior): Update.
+ * remote-rdp.c (remote_rdp_create_inferior): Update.
+ * remote-rdi.c (arm_rdi_create_inferior): Update.
+ * remote-m32r-sdi.c (m32r_create_inferior): Update.
+ * remote-e7000.c (e7000_create_inferior): Update.
+ * procfs.c (procfs_create_inferior): Update.
+ * ocd.c (ocd_create_inferior): Update.
+ * ocd.h (ocd_create_inferior): Update.
+ * nto-procfs.c (procfs_create_inferior): Update.
+ * monitor.c (monitor_create_inferior): Update.
+ * lin-lwp.c (lin_lwp_create_inferior): Update.
+ * inftarg.c (child_create_inferior): Update.
+ * hpux-thread.c (hpux_thread_create_inferior): Update.
+ * gnu-nat.c (gnu_create_inferior): Update.
+
2004-05-25 Andrew Cagney <cagney@gnu.com>
* MAINTAINERS: Update e-mail address.
}
static void
-gnu_create_inferior (char *exec_file, char *allargs, char **env)
+gnu_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
struct inf *inf = cur_inf ();
static void go32_files_info (struct target_ops *target);
static void go32_stop (void);
static void go32_kill_inferior (void);
-static void go32_create_inferior (char *exec_file, char *args, char **env);
+static void go32_create_inferior (char *exec_file, char *args, char **env, int from_tty);
static void go32_mourn_inferior (void);
static int go32_can_run (void);
}
static void
-go32_create_inferior (char *exec_file, char *args, char **env)
+go32_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
extern char **environ;
jmp_buf start_state;
/* Fork an inferior process, and start debugging it with /proc. */
static void
-hpux_thread_create_inferior (char *exec_file, char *allargs, char **env)
+hpux_thread_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
- child_ops.to_create_inferior (exec_file, allargs, env);
+ child_ops.to_create_inferior (exec_file, allargs, env, from_tty);
if (hpux_thread_active)
{
/* We call get_inferior_args() because we might need to compute
the value now. */
target_create_inferior (exec_file, get_inferior_args (),
- environ_vector (inferior_environ));
+ environ_vector (inferior_environ), from_tty);
}
static void ptrace_him (int);
-static void child_create_inferior (char *, char *, char **);
+static void child_create_inferior (char *, char *, char **, int);
static void child_mourn_inferior (void);
ENV is the environment vector to pass. Errors reported with error(). */
static void
-child_create_inferior (char *exec_file, char *allargs, char **env)
+child_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
#ifdef HPUXHPPA
fork_inferior (exec_file, allargs, env, ptrace_me, ptrace_him, pre_fork_inferior, NULL);
}
static void
-lin_lwp_create_inferior (char *exec_file, char *allargs, char **env)
+lin_lwp_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
- child_ops.to_create_inferior (exec_file, allargs, env);
+ child_ops.to_create_inferior (exec_file, allargs, env, from_tty);
}
static void
the program at that point. */
static void
-monitor_create_inferior (char *exec_file, char *args, char **env)
+monitor_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty)
{
if (args && (*args != '\000'))
error ("Args are not supported by the monitor.");
}
static void
-procfs_create_inferior (char *exec_file, char *allargs, char **env)
+procfs_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
struct inheritance inherit;
pid_t pid;
the program at that point. */
void
-ocd_create_inferior (char *exec_file, char *args, char **env)
+ocd_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
if (args && (*args != '\000'))
error ("Args are not supported by BDM.");
void ocd_mourn (void);
-void ocd_create_inferior (char *exec_file, char *args, char **env);
+void ocd_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty);
int ocd_thread_alive (ptid_t th);
static void procfs_prepare_to_store (void);
static void procfs_kill_inferior (void);
static void procfs_mourn_inferior (void);
-static void procfs_create_inferior (char *, char *, char **);
+static void procfs_create_inferior (char *, char *, char **, int);
static ptid_t procfs_wait (ptid_t, struct target_waitstatus *);
static int procfs_xfer_memory (CORE_ADDR, char *, int, int,
struct mem_attrib *attrib,
*/
static void
-procfs_create_inferior (char *exec_file, char *allargs, char **env)
+procfs_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
char *shell_file = getenv ("SHELL");
char *tryname;
user types "run" after having attached. */
static void
-e7000_create_inferior (char *execfile, char *args, char **env)
+e7000_create_inferior (char *execfile, char *args, char **env,
+ int from_tty)
{
int entry_pt;
/* This is called not only when we first attach, but also when the
user types "run" after having attached. */
static void
-m32r_create_inferior (char *execfile, char *args, char **env)
+m32r_create_inferior (char *execfile, char *args, char **env,
+ int from_tty)
{
CORE_ADDR entry_pt;
static void mips_files_info (struct target_ops *ignore);
-static void mips_create_inferior (char *execfile, char *args, char **env);
-
static void mips_mourn_inferior (void);
static int pmon_makeb64 (unsigned long v, char *p, int n, int *chksum);
/* Start running on the target board. */
static void
-mips_create_inferior (char *execfile, char *args, char **env)
+mips_create_inferior (char *execfile, char *args, char **env, int from_tty)
{
CORE_ADDR entry_pt;
static void arm_rdi_open (char *name, int from_tty);
-static void arm_rdi_create_inferior (char *exec_file, char *args, char **env);
-
static void arm_rdi_close (int quitting);
static void arm_rdi_store_registers (int regno);
user types "run" after having attached. */
static void
-arm_rdi_create_inferior (char *exec_file, char *args, char **env)
+arm_rdi_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
int len, rslt;
unsigned long arg1, arg2;
static void
-remote_rdp_create_inferior (char *exec_file, char *allargs, char **env)
+remote_rdp_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
CORE_ADDR entry_point;
static void sds_mourn (void);
-static void sds_create_inferior (char *, char *, char **);
-
static void sds_load (char *, int);
static int getmessage (unsigned char *, int);
}
static void
-sds_create_inferior (char *exec_file, char *args, char **env)
+sds_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
inferior_ptid = pid_to_ptid (42000);
static void gdbsim_load (char *prog, int fromtty);
-static void gdbsim_create_inferior (char *exec_file, char *args, char **env);
-
static void gdbsim_open (char *args, int from_tty);
static void gdbsim_close (int quitting);
user types "run" after having attached. */
static void
-gdbsim_create_inferior (char *exec_file, char *args, char **env)
+gdbsim_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
int len;
char *arg_buf, **argv;
/* This is called not only when we first attach, but also when the
user types "run" after having attached. */
static void
-st2000_create_inferior (char *execfile, char *args, char **env)
+st2000_create_inferior (char *execfile, char *args, char **env,
+ int from_tty)
{
int entry_pt;
On VxWorks, we ignore exec_file. */
static void
-vx_create_inferior (char *exec_file, char *args, char **env)
+vx_create_inferior (char *exec_file, char *args, char **env, int from_tty)
{
enum clnt_stat status;
arg_array passArgs;
static void extended_remote_mourn (void);
-static void extended_remote_create_inferior (char *, char *, char **);
-static void extended_remote_async_create_inferior (char *, char *, char **);
-
static void remote_mourn_1 (struct target_ops *);
static void remote_send (char *buf, long sizeof_buf);
we're debugging, arguments and an environment. */
static void
-extended_remote_create_inferior (char *exec_file, char *args, char **env)
+extended_remote_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty)
{
/* Rip out the breakpoints; we'll reinsert them after restarting
the remote server. */
/* Async version of extended_remote_create_inferior. */
static void
-extended_remote_async_create_inferior (char *exec_file, char *args, char **env)
+extended_remote_async_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty)
{
/* Rip out the breakpoints; we'll reinsert them after restarting
the remote server. */
/* Fork an inferior process, and start debugging it with /proc. */
static void
-sol_thread_create_inferior (char *exec_file, char *allargs, char **env)
+sol_thread_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
- procfs_ops.to_create_inferior (exec_file, allargs, env);
+ procfs_ops.to_create_inferior (exec_file, allargs, env, from_tty);
if (sol_thread_active && !ptid_equal (inferior_ptid, null_ptid))
{
static void target_info (char *, int);
-static void maybe_kill_then_create_inferior (char *, char *, char **);
-
static void maybe_kill_then_attach (char *, int);
static void kill_or_be_killed (int);
static int debug_to_lookup_symbol (char *, CORE_ADDR *);
-static void debug_to_create_inferior (char *, char *, char **);
-
static void debug_to_mourn_inferior (void);
static int debug_to_can_run (void);
}
static void
-maybe_kill_then_create_inferior (char *exec, char *args, char **env)
+maybe_kill_then_create_inferior (char *exec, char *args, char **env,
+ int from_tty)
{
kill_or_be_killed (0);
- target_create_inferior (exec, args, env);
+ target_create_inferior (exec, args, env, from_tty);
}
/* Go through the target stack from top to bottom, copying over zero
}
void
-find_default_create_inferior (char *exec_file, char *allargs, char **env)
+find_default_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
struct target_ops *t;
t = find_default_run_target ("run");
- (t->to_create_inferior) (exec_file, allargs, env);
+ (t->to_create_inferior) (exec_file, allargs, env, from_tty);
return;
}
}
static void
-debug_to_create_inferior (char *exec_file, char *args, char **env)
+debug_to_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty)
{
- debug_target.to_create_inferior (exec_file, args, env);
+ debug_target.to_create_inferior (exec_file, args, env, from_tty);
- fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx)\n",
- exec_file, args);
+ fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx, %d)\n",
+ exec_file, args, from_tty);
}
static void
void (*to_kill) (void);
void (*to_load) (char *, int);
int (*to_lookup_symbol) (char *, CORE_ADDR *);
- void (*to_create_inferior) (char *, char *, char **);
+ void (*to_create_inferior) (char *, char *, char **, int);
void (*to_post_startup_inferior) (ptid_t);
void (*to_acknowledge_created_inferior) (int);
int (*to_insert_fork_catchpoint) (int);
ENV is the environment vector to pass. Errors reported with error().
On VxWorks and various standalone systems, we ignore exec_file. */
-#define target_create_inferior(exec_file, args, env) \
- (*current_target.to_create_inferior) (exec_file, args, env)
+#define target_create_inferior(exec_file, args, env, FROM_TTY) \
+ (*current_target.to_create_inferior) (exec_file, args, env, (FROM_TTY))
/* Some targets (such as ttrace-based HPUX) don't allow us to request
extern void find_default_attach (char *, int);
-extern void find_default_create_inferior (char *, char *, char **);
+extern void find_default_create_inferior (char *, char *, char **, int);
extern struct target_ops *find_run_target (void);
}
static void
-thread_db_create_inferior (char *exec_file, char *allargs, char **env)
+thread_db_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
if (!keep_thread_db)
{
using_thread_db = 0;
}
- target_beneath->to_create_inferior (exec_file, allargs, env);
+ target_beneath->to_create_inferior (exec_file, allargs, env, from_tty);
}
static void
This function only gets called with uw_thread_active == 0. */
static void
-uw_thread_create_inferior (char *exec_file, char *allargs, char **env)
+uw_thread_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
if (uw_thread_active)
deactivate_uw_thread ();
- procfs_ops.to_create_inferior (exec_file, allargs, env);
+ procfs_ops.to_create_inferior (exec_file, allargs, env, from_tty);
if (uw_thread_active)
{
find_main ();
ENV is the environment vector to pass. Errors reported with error(). */
static void
-child_create_inferior (char *exec_file, char *allargs, char **env)
+child_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
char *winenv;
char *temp;
ALLARGS is a string containing the arguments to the program.
ENV is the environment vector to pass. Errors reported with error(). */
static void
-child_create_inferior (char *exec_file, char *args, char **env)
+child_create_inferior (char *exec_file, char *args, char **env,
+ int from_tty)
{
PROCESS_INFORMATION pi;
struct target_waitstatus dummy;
ENV is the environment vector to pass. Errors reported with error(). */
static void
-child_create_inferior (char *exec_file, char *allargs, char **env)
+child_create_inferior (char *exec_file, char *allargs, char **env,
+ int from_tty)
{
char *winenv;
char *temp;