#include "event-top.h"
#include "inf-loop.h"
#include <sys/stat.h>
-#include "exceptions.h"
#include "inf-child.h"
#include "value.h"
#include "arch-utils.h"
#include <sys/types.h>
#include <unistd.h>
#include <signal.h>
-#include <string.h>
#include <ctype.h>
#include <sys/sysctl.h>
#include <sys/proc.h>
mach_port_t prev;
int i;
- unpush_target (darwin_ops);
-
/* Deallocate threads. */
if (inf->private->threads)
{
xfree (inf->private);
inf->private = NULL;
- generic_mourn_inferior ();
+ inf_child_mourn_inferior (ops);
}
static void
"returned: %d"),
kret);
- push_target (darwin_ops);
+ if (!target_is_pushed (darwin_ops))
+ push_target (darwin_ops);
}
static void
/* Attach to process PID, then initialize for debugging it
and wait for the trace-trap that results from attaching. */
static void
-darwin_attach (struct target_ops *ops, char *args, int from_tty)
+darwin_attach (struct target_ops *ops, const char *args, int from_tty)
{
pid_t pid;
pid_t pid2;
darwin_ops = inf_child_target ();
- darwin_ops->to_shortname = "darwin-child";
- darwin_ops->to_longname = _("Darwin child process");
- darwin_ops->to_doc =
- _("Darwin child process (started by the \"run\" command).");
darwin_ops->to_create_inferior = darwin_create_inferior;
darwin_ops->to_attach = darwin_attach;
darwin_ops->to_attach_no_wait = 0;