summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/gdb/dsrec.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2004-12-27 14:01:02 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2004-12-27 14:01:02 +0000
commit7cb023cfb07d13fb208030e4352f159f1e2b229d (patch)
tree961c03598dd9430c22e1c634d533db0a08de8999 /gnu/usr.bin/binutils/gdb/dsrec.c
parent5b0cde74db4ad7c994ffdca423951b72310dd8cb (diff)
Resolve conflicts for GDB 6.3. Add local patches.
ok deraadt@
Diffstat (limited to 'gnu/usr.bin/binutils/gdb/dsrec.c')
-rw-r--r--gnu/usr.bin/binutils/gdb/dsrec.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gnu/usr.bin/binutils/gdb/dsrec.c b/gnu/usr.bin/binutils/gdb/dsrec.c
index 142260002ff..2ca91fe5e21 100644
--- a/gnu/usr.bin/binutils/gdb/dsrec.c
+++ b/gnu/usr.bin/binutils/gdb/dsrec.c
@@ -1,5 +1,5 @@
/* S-record download support for GDB, the GNU debugger.
- Copyright 1995, 1996, 1997, 1999, 2000, 2001
+ Copyright 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004
Free Software Foundation, Inc.
This file is part of GDB.
@@ -93,7 +93,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
{
int numbytes;
bfd_vma addr = bfd_get_section_vma (abfd, s) + load_offset;
- bfd_size_type size = bfd_get_section_size_before_reloc (s);
+ bfd_size_type size = bfd_get_section_size (s);
char *section_name = (char *) bfd_get_section_name (abfd, s);
/* Both GDB and BFD have mechanisms for printing addresses.
In the below, GDB's is used so that the address is
@@ -124,8 +124,9 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
do
{
serial_write (desc, srec, reclen);
- if (ui_load_progress_hook)
- if (ui_load_progress_hook (section_name, (unsigned long) i))
+ if (deprecated_ui_load_progress_hook)
+ if (deprecated_ui_load_progress_hook (section_name,
+ (unsigned long) i))
error ("Canceled the download");
}
while (waitack != NULL && !waitack ());
@@ -137,8 +138,9 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
}
} /* Per-packet (or S-record) loop */
- if (ui_load_progress_hook)
- if (ui_load_progress_hook (section_name, (unsigned long) i))
+ if (deprecated_ui_load_progress_hook)
+ if (deprecated_ui_load_progress_hook (section_name,
+ (unsigned long) i))
error ("Canceled the download");
putchar_unfiltered ('\n');
}
@@ -261,7 +263,7 @@ make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
if (sect && abfd)
{
payload_size = (*maxrecsize - (1 + 1 + 2 + addr_size * 2 + 2)) / 2;
- payload_size = min (payload_size, sect->_raw_size - sectoff);
+ payload_size = min (payload_size, bfd_get_section_size (sect) - sectoff);
bfd_get_section_contents (abfd, sect, binbuf, sectoff, payload_size);
}