This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] gdbreply on 5.2 branch
- From: "David O'Brien" <obrien at FreeBSD dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 9 Jul 2002 10:23:00 -0700
- Subject: [PATCH] gdbreply on 5.2 branch
- Organization: The NUXI BSD Group
- Reply-to: obrien at FreeBSD dot org
I merged this from mainline (with some changes) so it will compile
cleanly on FreeBSD.
2002-07-09 David O'Brien <obrien@FreeBSD.org>
Merge from mainline:
* gdbserver/gdbreplay.c: Include needed system headers.
(remote_open): Conditional strchr prototype.
(perror_with_name, remote_close, remote_open, expect, play): Static.
Index: gdbserver/gdbreplay.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/gdbreplay.c,v
retrieving revision 1.4.10.1
retrieving revision 1.4.10.2
diff -u -r1.4.10.1 -r1.4.10.2
--- gdbserver/gdbreplay.c 29 Mar 2002 19:03:34 -0000 1.4.10.1
+++ gdbserver/gdbreplay.c 9 Jul 2002 17:20:23 -0000 1.4.10.2
@@ -31,6 +31,16 @@
#include <fcntl.h>
#include <errno.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
/* Sort of a hack... */
#define EOL (EOF - 1)
@@ -40,7 +50,7 @@
as the file name for which the error was encountered.
Then return to command level. */
-void
+static void
perror_with_name (char *string)
{
#ifndef STDC_HEADERS
@@ -71,7 +81,7 @@
exit (1);
}
-void
+static void
remote_close (void)
{
close (remote_desc);
@@ -80,10 +90,12 @@
/* Open a connection to a remote debugger.
NAME is the filename used for communication. */
-void
+static void
remote_open (char *name)
{
+#ifndef HAVE_STRING_H
extern char *strchr ();
+#endif
if (!strchr (name, ':'))
{
@@ -230,7 +242,7 @@
/* Accept input from gdb and match with chars from fp (after skipping one
blank) up until a \n is read from fp (which is not matched) */
-void
+static void
expect (FILE *fp)
{
int fromlog;
@@ -261,7 +273,7 @@
/* Play data back to gdb from fp (after skipping leading blank) up until a
\n is read from fp (which is discarded and not sent to gdb). */
-void
+static void
play (FILE *fp)
{
int fromlog;