aboutsummaryrefslogtreecommitdiff
path: root/gdb/gnu-nat.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1999-04-26 18:34:20 +0000
committerStan Shebs <shebs@codesourcery.com>1999-04-26 18:34:20 +0000
commit7a292a7adf506b866905b06b3024c0fd411c4583 (patch)
tree5b208bb48269b8a82d5c3a5f19c87b45a62a22f4 /gdb/gnu-nat.c
parent1996fae84682e8ddd146215dd2959ad1ec924c09 (diff)
downloadfsf-binutils-gdb-7a292a7adf506b866905b06b3024c0fd411c4583.zip
fsf-binutils-gdb-7a292a7adf506b866905b06b3024c0fd411c4583.tar.gz
fsf-binutils-gdb-7a292a7adf506b866905b06b3024c0fd411c4583.tar.bz2
import gdb-19990422 snapshot
Diffstat (limited to 'gdb/gnu-nat.c')
-rw-r--r--gdb/gnu-nat.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 156d981..795f8a8 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -23,6 +23,7 @@
*/
#include <stdio.h>
+#include <string.h>
#include <errno.h>
#include <signal.h>
#include <assert.h>
@@ -32,7 +33,8 @@
/* 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>
@@ -84,7 +86,6 @@ int gnu_debug_flag = 0;
/* Forward decls */
extern struct target_ops gnu_ops;
-extern char *strerror();
int inf_update_procs (struct inf *inf);
struct inf *make_inf ();
@@ -1911,7 +1912,7 @@ gnu_create_inferior (exec_file, allargs, env)
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);
@@ -1930,13 +1931,12 @@ gnu_create_inferior (exec_file, allargs, env)
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);
@@ -2082,10 +2082,11 @@ gnu_stop ()
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;
}
@@ -3169,11 +3170,9 @@ _initialize_gnu_nat ()
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
}
#ifdef FLUSH_INFERIOR_CACHE