diff options
author | Tom Tromey <tromey@redhat.com> | 2012-12-11 18:45:24 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-12-11 18:45:24 +0000 |
commit | 735522c243484a9fd3f5fb6281e3340e9a0565d0 (patch) | |
tree | 58372a0cd95a19ce7f6fefe404c80d14175c2119 | |
parent | 69b06cc85f4c884ae68fe35404cdfbcd188f69b9 (diff) | |
download | gdb-735522c243484a9fd3f5fb6281e3340e9a0565d0.zip gdb-735522c243484a9fd3f5fb6281e3340e9a0565d0.tar.gz gdb-735522c243484a9fd3f5fb6281e3340e9a0565d0.tar.bz2 |
* dsrec.c (report_transfer_performance): Don't declare.
(load_srec): Use gettimeofday, print_transfer_performance.
* symfile.c (report_transfer_performance): Remove.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/dsrec.c | 12 | ||||
-rw-r--r-- | gdb/symfile.c | 22 |
3 files changed, 12 insertions, 28 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fb92aab..3b4e031 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2012-12-11 Tom Tromey <tromey@redhat.com> + + * dsrec.c (report_transfer_performance): Don't declare. + (load_srec): Use gettimeofday, print_transfer_performance. + * symfile.c (report_transfer_performance): Remove. + 2012-12-11 Pedro Alves <pedro@codesourcery.com> Pedro Alves <palves@redhat.com> diff --git a/gdb/dsrec.c b/gdb/dsrec.c index 9ea23c0..9900496 100644 --- a/gdb/dsrec.c +++ b/gdb/dsrec.c @@ -20,13 +20,12 @@ #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 +54,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 +75,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 +150,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 +172,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); } diff --git a/gdb/symfile.c b/gdb/symfile.c index 1d3278b..9afaf91 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -82,10 +82,6 @@ static void clear_symtab_users_cleanup (void *ignore); /* Global variables owned by this file. */ int readnow_symbol_files; /* Read full symbols immediately. */ -/* External variables and functions referenced. */ - -extern void report_transfer_performance (unsigned long, time_t, time_t); - /* Functions this file defines. */ static void load_command (char *, int); @@ -2185,24 +2181,6 @@ generic_load (char *args, int from_tty) /* Report how fast the transfer went. */ -/* DEPRECATED: cagney/1999-10-18: report_transfer_performance is being - replaced by print_transfer_performance (with a very different - function signature). */ - -void -report_transfer_performance (unsigned long data_count, time_t start_time, - time_t end_time) -{ - struct timeval start, end; - - start.tv_sec = start_time; - start.tv_usec = 0; - end.tv_sec = end_time; - end.tv_usec = 0; - - print_transfer_performance (gdb_stdout, data_count, 0, &start, &end); -} - void print_transfer_performance (struct ui_file *stream, unsigned long data_count, |