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.
This commit is contained in:
Andrew Cagney 2004-05-25 14:58:31 +00:00
parent 1db2a7980c
commit c27cda74c7
30 changed files with 105 additions and 63 deletions

View file

@ -1,3 +1,37 @@
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.

View file

@ -2040,7 +2040,8 @@ cur_inf (void)
}
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 ();

View file

@ -183,7 +183,7 @@ static int go32_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
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);
@ -574,7 +574,7 @@ go32_kill_inferior (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;

View file

@ -431,9 +431,10 @@ hpux_thread_notice_signals (ptid_t ptid)
/* 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)
{

View file

@ -479,7 +479,7 @@ run_command (char *args, int from_tty)
/* 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);
}

View file

@ -73,7 +73,7 @@ static void ptrace_me (void);
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);
@ -356,7 +356,8 @@ ptrace_him (int pid)
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);

View file

@ -1758,9 +1758,10 @@ lin_lwp_kill (void)
}
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

View file

@ -2011,7 +2011,8 @@ monitor_kill (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.");

View file

@ -963,7 +963,8 @@ breakup_args (char *scratch, char **argv)
}
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;

View file

@ -1014,7 +1014,7 @@ ocd_mourn (void)
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.");

View file

@ -112,7 +112,8 @@ int ocd_xfer_memory (CORE_ADDR memaddr, char *myaddr,
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);

View file

@ -124,7 +124,7 @@ static void procfs_notice_signals (ptid_t);
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,
@ -4972,7 +4972,8 @@ procfs_set_exec_trap (void)
*/
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;

View file

@ -371,7 +371,8 @@ get_hex_regs (int n, int regno)
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;

View file

@ -264,7 +264,8 @@ check_mmu_status (void)
/* 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;

View file

@ -114,8 +114,6 @@ static int mips_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
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);
@ -2178,7 +2176,7 @@ Give up (and stop debugging it)? "))
/* 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;

View file

@ -68,8 +68,6 @@ static void arm_rdi_resume (ptid_t pid, int step,
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);
@ -334,7 +332,7 @@ device is attached to the remote system (e.g. /dev/ttya).");
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;

View file

@ -1351,7 +1351,8 @@ remote_rdp_files_info (struct target_ops *target)
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;

View file

@ -76,8 +76,6 @@ static void sds_store_registers (int);
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);
@ -985,7 +983,7 @@ sds_mourn (void)
}
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);

View file

@ -83,8 +83,6 @@ static void gdbsim_kill (void);
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);
@ -429,7 +427,7 @@ gdbsim_load (char *prog, int fromtty)
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;

View file

@ -229,7 +229,8 @@ get_hex_regs (int n, int regno)
/* 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;

View file

@ -202,7 +202,7 @@ vx_remove_breakpoint (int addr)
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;

View file

@ -107,9 +107,6 @@ static void extended_remote_restart (void);
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);
@ -4246,7 +4243,8 @@ remote_mourn_1 (struct target_ops *target)
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. */
@ -4268,7 +4266,8 @@ extended_remote_create_inferior (char *exec_file, char *args, char **env)
/* 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. */

View file

@ -750,9 +750,10 @@ sol_thread_notice_signals (ptid_t ptid)
/* 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))
{

View file

@ -41,8 +41,6 @@
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);
@ -151,8 +149,6 @@ static void debug_to_load (char *, 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);
@ -339,10 +335,11 @@ maybe_kill_then_attach (char *args, int from_tty)
}
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
@ -1340,12 +1337,13 @@ find_default_attach (char *args, int from_tty)
}
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;
}
@ -2071,12 +2069,13 @@ debug_to_lookup_symbol (char *name, CORE_ADDR *addrp)
}
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

View file

@ -353,7 +353,7 @@ struct target_ops
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);
@ -712,8 +712,8 @@ extern void target_load (char *arg, int from_tty);
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
@ -1182,7 +1182,7 @@ extern void noprocess (void);
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);

View file

@ -1063,7 +1063,8 @@ thread_db_kill (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)
{
@ -1071,7 +1072,7 @@ thread_db_create_inferior (char *exec_file, char *allargs, char **env)
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

View file

@ -797,12 +797,13 @@ uw_thread_prepare_to_store (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 ();

View file

@ -1680,7 +1680,8 @@ child_open (char *arg, int from_tty)
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;

View file

@ -1720,7 +1720,8 @@ wince_initialize (void)
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;

View file

@ -1680,7 +1680,8 @@ child_open (char *arg, int from_tty)
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;