2000-07-03 Christopher Faylor <cgf@cygnus.com>
[deliverable/binutils-gdb.git] / gdb / dsrec.c
index 9fae3416d0031adc0c983ec3c8db0d1289265408..31b8fc277df9de8b0537b5e2517f1967316d4e06 100644 (file)
 #include "srec.h"
 #include <time.h>
 
-int (*ui_load_progress_hook) PARAMS ((char *, unsigned long));
-extern void report_transfer_performance PARAMS ((unsigned long, time_t, time_t));
+extern void report_transfer_performance (unsigned long, time_t, time_t);
 
 extern int remote_debug;
 
-static int make_srec PARAMS ((char *srec, CORE_ADDR targ_addr, bfd * abfd,
-                             asection * sect, int sectoff, int *maxrecsize,
-                             int flags));
+static int make_srec (char *srec, CORE_ADDR targ_addr, bfd * abfd,
+                     asection * sect, int sectoff, int *maxrecsize,
+                     int flags);
 
 /* Download an executable by converting it to S records.  DESC is a
    serial_t to send the data to.  FILE is the name of the file to be
@@ -52,7 +51,7 @@ load_srec (desc, file, load_offset, maxrecsize, flags, hashmark, waitack)
      int maxrecsize;
      int flags;
      int hashmark;
-     int (*waitack) PARAMS ((void));
+     int (*waitack) (void);
 {
   bfd *abfd;
   asection *s;
@@ -98,8 +97,14 @@ load_srec (desc, file, load_offset, maxrecsize, flags, hashmark, waitack)
        bfd_vma addr = bfd_get_section_vma (abfd, s) + load_offset;
        bfd_size_type size = bfd_get_section_size_before_reloc (s);
        char *section_name = (char *) bfd_get_section_name (abfd, s);
-       printf_filtered ("%s\t: 0x%08x .. 0x%08x  ",
-                        section_name, (int) addr, (int) addr + size);
+       /* Both GDB and BFD have mechanisms for printing addresses.
+           In the below, GDB's is used so that the address is
+           consistent with the rest of GDB.  BFD's printf_vma() could
+           have also been used. cagney 1999-09-01 */
+       printf_filtered ("%s\t: 0x%s .. 0x%s  ",
+                        section_name,
+                        paddr (addr),
+                        paddr (addr + size));
        gdb_flush (gdb_stdout);
 
        data_count += size;
@@ -257,8 +262,8 @@ make_srec (srec, targ_addr, abfd, sect, sectoff, maxrecsize, flags)
   else if (tmp & SREC_4_BYTE_ADDR)
     addr_size = 4;
   else
-    fatal ("make_srec:  Bad address (0x%x), or bad flags (0x%x).",
-          targ_addr, flags);
+    internal_error ("make_srec:  Bad address (0x%x), or bad flags (0x%x).",
+                   targ_addr, flags);
 
   /* Now that we know the address size, we can figure out how much
      data this record can hold.  */
This page took 0.026824 seconds and 4 git commands to generate.