/* Target-vector operations for controlling Unix child processes, for GDB.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
- 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
+ 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Contributed by Cygnus Support.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include "defs.h"
#include "frame.h" /* required by inferior.h */
#include <signal.h>
#include <sys/types.h>
#include <fcntl.h>
-#include "observer.h"
#include "gdb_wait.h"
#include "inflow.h"
int status;
char *execd_pathname = NULL;
int exit_status;
- int related_pid;
int syscall_id;
enum target_waitkind kind;
int pid;
char *dummy;
if (!args)
- error_no_arg ("process-id to attach");
+ error_no_arg (_("process-id to attach"));
dummy = args;
pid = strtol (args, &dummy, 0);
/* Some targets don't set errno on errors, grrr! */
if ((pid == 0) && (args == dummy))
- error ("Illegal process-id: %s\n", args);
+ error (_("Illegal process-id: %s."), args);
if (pid == getpid ()) /* Trying to masturbate? */
- error ("I refuse to debug myself!");
+ error (_("I refuse to debug myself!"));
if (from_tty)
{
exec_file = (char *) get_exec_file (0);
if (exec_file)
- printf_unfiltered ("Attaching to program: %s, %s\n", exec_file,
+ printf_unfiltered (_("Attaching to program: %s, %s\n"), exec_file,
target_pid_to_str (pid_to_ptid (pid)));
else
- printf_unfiltered ("Attaching to %s\n",
+ printf_unfiltered (_("Attaching to %s\n"),
target_pid_to_str (pid_to_ptid (pid)));
gdb_flush (gdb_stdout);
inferior_ptid = pid_to_ptid (pid);
push_target (&deprecated_child_ops);
-
- /* Do this first, before anything has had a chance to query the
- inferior's symbol table or similar. */
- observer_notify_inferior_created (¤t_target, from_tty);
}
#if !defined(CHILD_POST_ATTACH)
char *exec_file = get_exec_file (0);
if (exec_file == 0)
exec_file = "";
- printf_unfiltered ("Detaching from program: %s, %s\n", exec_file,
+ printf_unfiltered (_("Detaching from program: %s, %s\n"), exec_file,
target_pid_to_str (pid_to_ptid (pid)));
gdb_flush (gdb_stdout);
}
static void
child_files_info (struct target_ops *ignore)
{
- printf_unfiltered ("\tUsing the running image of %s %s.\n",
+ printf_unfiltered (_("\tUsing the running image of %s %s.\n"),
attach_flag ? "attached" : "child", target_pid_to_str (inferior_ptid));
}
static void
child_open (char *arg, int from_tty)
{
- error ("Use the \"run\" command to start a Unix child process.");
+ error (_("Use the \"run\" command to start a Unix child process."));
}
/* Stub function which causes the inferior that runs it, to be ptrace-able
int from_tty)
{
fork_inferior (exec_file, allargs, env, ptrace_me, ptrace_him, NULL, NULL);
-
- /* We are at the first instruction we care about. */
- observer_notify_inferior_created (¤t_target, from_tty);
- /* Pedal to the metal... */
- proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
}
#if !defined(CHILD_POST_STARTUP_INFERIOR)
#if !defined(CHILD_FOLLOW_FORK)
int
-child_follow_fork (int follow_child)
+child_follow_fork (struct target_ops *ops, int follow_child)
{
/* This version of Unix doesn't support following fork or vfork events. */
return 0;
static LONGEST
child_xfer_partial (struct target_ops *ops, enum target_object object,
- const char *annex, void *readbuf,
- const void *writebuf, ULONGEST offset, LONGEST len)
+ const char *annex, gdb_byte *readbuf,
+ const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
{
switch (object)
{