aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1997-06-13 19:56:51 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1997-06-13 19:56:51 +0000
commita6b6627ba21710e18c5c72dcd46cc59bccba3e23 (patch)
tree4ef401bbdb667013073346bd3950b250fa5d258d /gdb/symfile.c
parent40b647e9e227be8176afeb77f219c3cfb44d2d06 (diff)
downloadgdb-a6b6627ba21710e18c5c72dcd46cc59bccba3e23.zip
gdb-a6b6627ba21710e18c5c72dcd46cc59bccba3e23.tar.gz
gdb-a6b6627ba21710e18c5c72dcd46cc59bccba3e23.tar.bz2
* symfile.c (generic_load): Check return code of target_write_memory.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index ecdeaf9..650c4c3 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);
}