* thread-db.c (check_event): Don't report an error if we encounter
[deliverable/binutils-gdb.git] / gdb / dsrec.c
index b51d857daef31a73946c436cac6f0779c52cf6cb..669a74a664dfaeb9808adcf359282e398baec05d 100644 (file)
@@ -1,5 +1,6 @@
 /* S-record download support for GDB, the GNU debugger.
-   Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1997, 1999, 2000, 2001
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "srec.h"
 #include <time.h>
 
-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
@@ -44,14 +45,8 @@ static int make_srec PARAMS ((char *srec, CORE_ADDR targ_addr, bfd * abfd,
    and returns non-zero if the ack is read correctly.  */
 
 void
-load_srec (desc, file, load_offset, maxrecsize, flags, hashmark, waitack)
-     serial_t desc;
-     const char *file;
-     bfd_vma load_offset;
-     int maxrecsize;
-     int flags;
-     int hashmark;
-     int (*waitack) PARAMS ((void));
+load_srec (serial_t desc, const char *file, bfd_vma load_offset, int maxrecsize,
+          int flags, int hashmark, int (*waitack) (void))
 {
   bfd *abfd;
   asection *s;
@@ -218,14 +213,8 @@ load_srec (desc, file, load_offset, maxrecsize, flags, hashmark, waitack)
  */
 
 static int
-make_srec (srec, targ_addr, abfd, sect, sectoff, maxrecsize, flags)
-     char *srec;
-     CORE_ADDR targ_addr;
-     bfd *abfd;
-     asection *sect;
-     int sectoff;
-     int *maxrecsize;
-     int flags;
+make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
+          int sectoff, int *maxrecsize, int flags)
 {
   unsigned char checksum;
   int tmp;
@@ -253,6 +242,7 @@ make_srec (srec, targ_addr, abfd, sect, sectoff, maxrecsize, flags)
     {
       tmp = flags >> SREC_TERM_SHIFT;  /* Term record */
       code_table = term_code_table;
+      binbuf = NULL;
     }
 
   if ((tmp & SREC_2_BYTE_ADDR) && (targ_addr <= 0xffff))
@@ -262,8 +252,9 @@ make_srec (srec, targ_addr, abfd, sect, sectoff, maxrecsize, flags)
   else if (tmp & SREC_4_BYTE_ADDR)
     addr_size = 4;
   else
-    internal_error ("make_srec:  Bad address (0x%x), or bad flags (0x%x).",
-                   targ_addr, flags);
+    internal_error (__FILE__, __LINE__,
+                   "make_srec:  Bad address (0x%s), or bad flags (0x%x).",
+                   paddr (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.024662 seconds and 4 git commands to generate.