/* Base/prototype target for default child (native) targets.
- Copyright (C) 1988-2014 Free Software Foundation, Inc.
+ Copyright (C) 1988-2015 Free Software Foundation, Inc.
This file is part of GDB.
#include "symtab.h"
#include "target.h"
#include "inferior.h"
-#include <string.h>
#include <sys/stat.h>
#include "inf-child.h"
#include "gdb/fileio.h"
/* See inf-child.h. */
void
-inf_child_open_target (struct target_ops *target, char *arg, int from_tty)
+inf_child_open_target (struct target_ops *target, const char *arg,
+ int from_tty)
{
target_preopen (from_tty);
push_target (target);
}
static void
-inf_child_open (char *arg, int from_tty)
+inf_child_open (const char *arg, int from_tty)
{
inf_child_open_target (inf_child_ops, arg, from_tty);
}
/* Implement the to_disconnect target_ops method. */
static void
-inf_child_disconnect (struct target_ops *target, char *args, int from_tty)
+inf_child_disconnect (struct target_ops *target, const char *args, int from_tty)
{
if (args != NULL)
error (_("Argument given to \"disconnect\"."));
inf_child_explicitly_opened = 0;
}
+void
+inf_child_mourn_inferior (struct target_ops *ops)
+{
+ generic_mourn_inferior ();
+ inf_child_maybe_unpush_target (ops);
+}
+
/* See inf-child.h. */
void
{
/* We support readlink only on systems that also provide a compile-time
maximum path length (PATH_MAX), at least for now. */
-#if defined (HAVE_READLINK) && defined (PATH_MAX)
+#if defined (PATH_MAX)
char buf[PATH_MAX];
int len;
char *ret;
t->to_terminal_init = child_terminal_init;
t->to_terminal_inferior = child_terminal_inferior;
t->to_terminal_ours_for_output = child_terminal_ours_for_output;
- t->to_terminal_save_ours = child_terminal_save_ours;
t->to_terminal_ours = child_terminal_ours;
t->to_terminal_info = child_terminal_info;
t->to_post_startup_inferior = inf_child_post_startup_inferior;