From: David Edelsohn Date: Fri, 13 Jun 1997 19:56:51 +0000 (+0000) Subject: * symfile.c (generic_load): Check return code of target_write_memory. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6b6627ba21710e18c5c72dcd46cc59bccba3e23;p=binutils-gdb.git * symfile.c (generic_load): Check return code of target_write_memory. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cc835d1911d..303ecbe9fd7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +Fri Jun 13 12:55:49 1997 Doug Evans + + * symfile.c (generic_load): Check return code of target_write_memory. + Fri Jun 13 10:28:09 1997 Fred Fish * config/i386/nm-linux.h: Enable prototypes that were #ifdef out. diff --git a/gdb/symfile.c b/gdb/symfile.c index ecdeaf9b81a..650c4c3b267 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1020,13 +1020,15 @@ generic_load (filename, from_tty) to look at during a long download. */ printf_filtered ("Loading section %s, size 0x%lx lma ", bfd_get_section_name (loadfile_bfd, s), - (unsigned long) size); + (unsigned long) size); print_address_numeric (lma, 1, gdb_stdout); printf_filtered ("\n"); bfd_get_section_contents (loadfile_bfd, s, buffer, 0, size); - target_write_memory (lma, buffer, size); + if (target_write_memory (lma, buffer, size) != 0) + error ("Memory access error while loading section %s.", + bfd_get_section_name (loadfile_bfd, s)); do_cleanups (old_chain); }