From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: gdb-patches@cygnus.com Subject: [kettenis@delius.kettenis.nl: Fixes for gnu-nat.c] Date: Fri, 05 Mar 1999 11:22:00 -0000 Message-id: <199903051933.UAA00110@delius.kettenis.nl> X-SW-Source: 1999-03/msg00006.html Apparently, this message did not reach the mailing list archives, so I doubt if it has reached anyone at all. ------- Start of forwarded message ------- Date: 4 Mar 1999 22:53:21 +0100 From: Mark Kettenis To: gdb-patches@cygnus.com Subject: Fixes for gnu-nat.c Here are some patches that brings the machine-specific code for the Hurd up to date. About including and defining _SYS_WAIT_H: yes I know what I'm doing. It's a gross hack but it is what Miles Bader intended. Mark 1999-03-04 Mark Kettenis * gnu-nat.c: Include . Remove declaration of strerror. Include instead of and define _SYS_WAIT_H to prevent the warning that we should not include it. (gnu_create_inferior): Change return type of attach_to_child to void. Do not return INFERIOR_PID. (gnu_pid_to_exec_file): Change return type to char *. Return NULL. - --- /home/kettenis/src/gdb-4.17.85/gdb/gnu-nat.c Thu Dec 31 22:58:06 1998 +++ gdb/gdb/gnu-nat.c Thu Mar 4 22:47:46 1999 @@ -23,6 +23,7 @@ */ #include +#include #include #include #include @@ -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 +#define _SYS_WAIT_H /* Inhibit warning from . */ +#include #include #include @@ -84,7 +86,6 @@ /* 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 @@ 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 @@ 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 @@ 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; } ------- End of forwarded message ------- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: gdb-patches@cygnus.com Subject: [kettenis@delius.kettenis.nl: Fixes for gnu-nat.c] Date: Thu, 01 Apr 1999 00:00:00 -0000 Message-ID: <199903051933.UAA00110@delius.kettenis.nl> X-SW-Source: 1999-q1/msg00060.html Message-ID: <19990401000000._fsfZEImJLMtrUG9KRJPmIeaaIQ3cBoUaRZdmjiboAg@z> Apparently, this message did not reach the mailing list archives, so I doubt if it has reached anyone at all. ------- Start of forwarded message ------- Date: 4 Mar 1999 22:53:21 +0100 From: Mark Kettenis To: gdb-patches@cygnus.com Subject: Fixes for gnu-nat.c Here are some patches that brings the machine-specific code for the Hurd up to date. About including and defining _SYS_WAIT_H: yes I know what I'm doing. It's a gross hack but it is what Miles Bader intended. Mark 1999-03-04 Mark Kettenis * gnu-nat.c: Include . Remove declaration of strerror. Include instead of and define _SYS_WAIT_H to prevent the warning that we should not include it. (gnu_create_inferior): Change return type of attach_to_child to void. Do not return INFERIOR_PID. (gnu_pid_to_exec_file): Change return type to char *. Return NULL. - --- /home/kettenis/src/gdb-4.17.85/gdb/gnu-nat.c Thu Dec 31 22:58:06 1998 +++ gdb/gdb/gnu-nat.c Thu Mar 4 22:47:46 1999 @@ -23,6 +23,7 @@ */ #include +#include #include #include #include @@ -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 +#define _SYS_WAIT_H /* Inhibit warning from . */ +#include #include #include @@ -84,7 +86,6 @@ /* 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 @@ 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 @@ 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 @@ 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; } ------- End of forwarded message -------