*/
#include <stdio.h>
+#include <string.h>
#include <errno.h>
#include <signal.h>
#include <assert.h>
/* We include this because we don't need the access macros and they conflict
with gdb's definitions (ick). This is very non standard! */
-#include <waitflags.h>
+#define _SYS_WAIT_H /* Inhibit warning from <bits/waitflags.h>. */
+#include <bits/waitflags.h>
#include <mach.h>
#include <mach/message.h>
/* Forward decls */
extern struct target_ops gnu_ops;
-extern char *strerror();
int inf_update_procs (struct inf *inf);
struct inf *make_inf ();
if (ptrace (PTRACE_TRACEME) != 0)
error ("ptrace (PTRACE_TRACEME) failed!");
}
- int attach_to_child (int pid)
+ void attach_to_child (int pid)
{
/* Attach to the now stopped child, which is actually a shell... */
inf_debug (inf, "attaching to child: %d", pid);
inferior_pid = inf_pick_first_thread ();
startup_inferior (inf->pending_execs);
-
- return inferior_pid;
}
inf_debug (inf, "creating inferior");
- fork_inferior (exec_file, allargs, env, trace_me, attach_to_child, NULL, NULL);
+ fork_inferior (exec_file, allargs, env, trace_me, attach_to_child,
+ NULL, NULL);
inf_update_signal_thread (inf);
inf_set_traced (inf, inf->want_signals);
error ("to_stop target function not implemented");
}
-static void
+static char *
gnu_pid_to_exec_file ()
{
error ("to_pid_to_exec_file target function not implemented");
+ return NULL;
}
add_task_commands ();
add_thread_commands ();
-#if MAINTENANCE_CMDS
add_set_cmd ("gnu-debug", class_maintenance,
var_boolean, (char *)&gnu_debug_flag,
"Set debugging output for the gnu backend.", &maintenancelist);
-#endif
}
\f
#ifdef FLUSH_INFERIOR_CACHE