summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid O'Brien <obrien@FreeBSD.org>2002-07-09 17:20:23 +0000
committerDavid O'Brien <obrien@FreeBSD.org>2002-07-09 17:20:23 +0000
commitf4c9a27c36fc27c8b6bbc658d13b220adb6bcf14 (patch)
treee2d0e592ed4fc4dcd78af915e04856981256b6bb
parent579e1c613b8837ad54a5875cfa9ed1f4c3cf0957 (diff)
downloadgdb-f4c9a27c36fc27c8b6bbc658d13b220adb6bcf14.tar.gz
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.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/gdbserver/gdbreplay.c22
2 files changed, 24 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9483a2af66d..437f27dbe92 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2002-07-09 Michal Ludvig <mludvig@suse.cz>
* NEWS: Note about dwarf2cfi improvements.
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index dce4079e3f1..8c57906ea07 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -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 @@ static int remote_desc;
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 @@ sync_error (FILE *fp, char *desc, int expect, int got)
exit (1);
}
-void
+static void
remote_close (void)
{
close (remote_desc);
@@ -80,10 +90,12 @@ remote_close (void)
/* 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 @@ logchar (FILE *fp)
/* 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 @@ expect (FILE *fp)
/* 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;