summaryrefslogtreecommitdiff
path: root/gdb/dsrec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dsrec.c')
-rw-r--r--gdb/dsrec.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/dsrec.c b/gdb/dsrec.c
index 736019fd106..cee2d858c4a 100644
--- a/gdb/dsrec.c
+++ b/gdb/dsrec.c
@@ -97,7 +97,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
/* 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 */
+ have also been used. cagney 1999-09-01 */
printf_filtered ("%s\t: %s .. %s ",
section_name,
paddress (target_gdbarch, addr),
@@ -135,7 +135,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
putchar_unfiltered ('#');
gdb_flush (gdb_stdout);
}
- } /* Per-packet (or S-record) loop */
+ } /* Per-packet (or S-record) loop. */
if (deprecated_ui_load_progress_hook)
if (deprecated_ui_load_progress_hook (section_name,
@@ -173,7 +173,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
}
/*
- * make_srec -- make an srecord. This writes each line, one at a
+ * make_srec -- make an srecord. This writes each line, one at a
* time, each with it's own header and trailer line.
* An srecord looks like this:
*
@@ -190,9 +190,9 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
*
* Where
* - length
- * is the number of bytes following upto the checksum. Note that
- * this is not the number of chars following, since it takes two
- * chars to represent a byte.
+ * is the number of bytes following upto the checksum. Note
+ * that this is not the number of chars following, since it
+ * takes two chars to represent a byte.
* - type
* is one of:
* 0) header record
@@ -267,7 +267,7 @@ make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
bfd_get_section_contents (abfd, sect, binbuf, sectoff, payload_size);
}
else
- payload_size = 0; /* Term or header packets have no payload */
+ payload_size = 0; /* Term or header packets have no payload. */
/* Output the header. */
snprintf (srec, (*maxrecsize) + 1, "S%c%02X%0*X",
@@ -282,7 +282,7 @@ make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
checksum = 0;
checksum += (payload_size + addr_size + 1 /* Packet length */
- + (targ_addr & 0xff) /* Address... */
+ + (targ_addr & 0xff) /* Address... */
+ ((targ_addr >> 8) & 0xff)
+ ((targ_addr >> 16) & 0xff)
+ ((targ_addr >> 24) & 0xff));