gdbserver: fix killed-outside.exp
[deliverable/binutils-gdb.git] / gdb / gdbserver / gdbreplay.c
index c47740470b02fc5faf64ae0cf4e8f772a6142558..79aa8aa8a859dbe1c8ef9bdd2960fc8c8ffc17ae 100644 (file)
@@ -1,6 +1,5 @@
 /* Replay a remote debug session logfile for GDB.
-   Copyright (C) 1996, 1998, 1999, 2000, 2002, 2003, 2005, 2006, 2007, 2008,
-   2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1996-2015 Free Software Foundation, Inc.
    Written by Fred Fish (fnf@cygnus.com) from pieces of gdbserver.
 
    This file is part of GDB.
@@ -19,6 +18,9 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
+#include "build-gnulib-gdbserver/config.h"
+#include "version.h"
+
 #include <stdio.h>
 #if HAVE_SYS_FILE_H
 #include <sys/file.h>
 #if HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#if HAVE_ERRNO_H
 #include <errno.h>
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 #if HAVE_NETINET_TCP_H
 #include <netinet/tcp.h>
 #endif
-#if HAVE_ALLOCA_H
+
 #include <alloca.h>
-#endif
-#if HAVE_MALLOC_H
-#include <malloc.h>
-#endif
+
 #if USE_WIN32API
 #include <winsock2.h>
 #endif
@@ -71,10 +62,6 @@ typedef int socklen_t;
 /* Sort of a hack... */
 #define EOL (EOF - 1)
 
-/* Version information, from version.c.  */
-extern const char version[];
-extern const char host_name[];
-
 static int remote_desc;
 
 #ifdef __MINGW32CE__
@@ -272,7 +259,7 @@ remote_open (char *name)
 }
 
 static int
-tohex (int ch)
+fromhex (int ch)
 {
   if (ch >= '0' && ch <= '9')
     {
@@ -335,11 +322,11 @@ logchar (FILE *fp)
          ch2 = fgetc (fp);
          fputc (ch2, stdout);
          fflush (stdout);
-         ch = tohex (ch2) << 4;
+         ch = fromhex (ch2) << 4;
          ch2 = fgetc (fp);
          fputc (ch2, stdout);
          fflush (stdout);
-         ch |= tohex (ch2);
+         ch |= fromhex (ch2);
          break;
        default:
          /* Treat any other char as just itself */
@@ -420,7 +407,7 @@ static void
 gdbreplay_version (void)
 {
   printf ("GNU gdbreplay %s%s\n"
-         "Copyright (C) 2012 Free Software Foundation, Inc.\n"
+         "Copyright (C) 2015 Free Software Foundation, Inc.\n"
          "gdbreplay is free software, covered by "
          "the GNU General Public License.\n"
          "This gdbreplay was configured as \"%s\"\n",
This page took 0.028237 seconds and 4 git commands to generate.