Don't complain about -fPIC for undefined symbol
[deliverable/binutils-gdb.git] / gdb / dsrec.c
index 9ea23c0aec23cbf1b7b9347a87bb3a79fd625d8f..82cc9682bc16659b04b287e9bc2443a68143a34c 100644 (file)
@@ -1,6 +1,5 @@
 /* S-record download support for GDB, the GNU debugger.
-   Copyright (C) 1995-1997, 1999-2001, 2003-2004, 2007-2012 Free
-   Software Foundation, Inc.
+   Copyright (C) 1995-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "defs.h"
 #include "serial.h"
 #include "srec.h"
+#include <sys/time.h>
 #include <time.h>
-#include "gdb_assert.h"
-#include "gdb_string.h"
 #include "gdb_bfd.h"
 
-extern void report_transfer_performance (unsigned long, time_t, time_t);
-
 extern int remote_debug;
 
 static int make_srec (char *srec, CORE_ADDR targ_addr, bfd * abfd,
@@ -55,7 +51,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
   char *srec;
   int i;
   int reclen;
-  time_t start_time, end_time;
+  struct timeval start_time, end_time;
   unsigned long data_count = 0;
   struct cleanup *cleanup;
 
@@ -76,7 +72,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
       return;
     }
 
-  start_time = time (NULL);
+  gettimeofday (&start_time, NULL);
 
   /* Write a type 0 header record. no data for a type 0, and there
      is no data, so len is 0.  */
@@ -151,7 +147,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
   if (hashmark)
     putchar_unfiltered ('\n');
 
-  end_time = time (NULL);
+  gettimeofday (&end_time, NULL);
 
   /* Write a terminator record.  */
 
@@ -173,7 +169,8 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
 
   serial_flush_input (desc);
 
-  report_transfer_performance (data_count, start_time, end_time);
+  print_transfer_performance (gdb_stdout, data_count, 0,
+                             &start_time, &end_time);
   do_cleanups (cleanup);
 }
 
@@ -227,10 +224,10 @@ make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
 {
   unsigned char checksum;
   int tmp;
-  const static char hextab[] = "0123456789ABCDEF";
-  const static char data_code_table[] = "123";
-  const static char term_code_table[] = "987";
-  const static char header_code_table[] = "000";
+  static const char hextab[] = "0123456789ABCDEF";
+  static const char data_code_table[] = "123";
+  static const char term_code_table[] = "987";
+  static const char header_code_table[] = "000";
   char const *code_table;
   int addr_size;
   int payload_size;
This page took 0.038241 seconds and 4 git commands to generate.