Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [kettenis@delius.kettenis.nl: Fixes for gnu-nat.c]
@ 1999-03-05 11:22 Mark Kettenis
  1999-03-08 13:09 ` Jim Blandy
  1999-04-01  0:00 ` Mark Kettenis
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Kettenis @ 1999-03-05 11:22 UTC (permalink / raw)
  To: gdb-patches

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 <kettenis@delius.kettenis.nl>
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 <bits/waitflags.h> 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  <kettenis@gnu.org>

	* gnu-nat.c: Include <string.h>.  Remove declaration of strerror.
	Include <bits/waitflags.h> instead of <waitflags.h> 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 <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 @@
 /* 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 -------


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-04-01  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-05 11:22 [kettenis@delius.kettenis.nl: Fixes for gnu-nat.c] Mark Kettenis
1999-03-08 13:09 ` Jim Blandy
1999-04-01  0:00   ` Jim Blandy
1999-04-01  0:00 ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox