Remove usage of find_inferior in last_thread_of_process_p
[deliverable/binutils-gdb.git] / gdb / gdbserver / gdbreplay.c
index c0d0c8f15ce65f07527f3363a2b88c2af894d387..b76850617fba1bb44705f57c3e6a5ab9d1cfc9d5 100644 (file)
@@ -1,5 +1,5 @@
 /* Replay a remote debug session logfile for GDB.
-   Copyright (C) 1996-2013 Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Written by Fred Fish (fnf@cygnus.com) from pieces of gdbserver.
 
    This file is part of GDB.
 #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
@@ -153,7 +142,7 @@ perror_with_name (const char *string)
 }
 
 static void
-sync_error (FILE *fp, char *desc, int expect, int got)
+sync_error (FILE *fp, const char *desc, int expect, int got)
 {
   fprintf (stderr, "\n%s\n", desc);
   fprintf (stderr, "At logfile offset %ld, expected '0x%x' got '0x%x'\n",
@@ -270,7 +259,7 @@ remote_open (char *name)
 }
 
 static int
-tohex (int ch)
+fromhex (int ch)
 {
   if (ch >= '0' && ch <= '9')
     {
@@ -333,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 */
@@ -418,7 +407,7 @@ static void
 gdbreplay_version (void)
 {
   printf ("GNU gdbreplay %s%s\n"
-         "Copyright (C) 2013 Free Software Foundation, Inc.\n"
+         "Copyright (C) 2017 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.024912 seconds and 4 git commands to generate.