2011-03-01 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Wed, 2 Mar 2011 01:09:52 +0000 (01:09 +0000)
committerMichael Snyder <msnyder@vmware.com>
Wed, 2 Mar 2011 01:09:52 +0000 (01:09 +0000)
* cli/cli-dump.c (dump_bfd_file): Check error return and warn.

gdb/ChangeLog
gdb/cli/cli-dump.c

index 8694cb13cbcda6b65d5a3b77f680b1fa060526c0..158d5fc86e4a68fbacb590f07b98ca1c155f809f 100644 (file)
@@ -1,5 +1,7 @@
 2011-03-01  Michael Snyder  <msnyder@vmware.com>
 
+       * cli/cli-dump.c (dump_bfd_file): Check error return and warn.
+
        * jv-lang.c (evaluate_subexp_java): Conditional can't be true.
 
        * dwarf2read.c (dwarf2_compute_name): NAME cannot be null here.
index 4bba10c35b84b52111a2349a8bc44882cf0174c3..ac6270e645021683dd4ef56ac2fcdd3049e101cb 100644 (file)
@@ -202,7 +202,9 @@ dump_bfd_file (const char *filename, const char *mode,
                                          | SEC_ALLOC
                                          | SEC_LOAD));
   osection->entsize = 0;
-  bfd_set_section_contents (obfd, osection, buf, 0, len);
+  if (!bfd_set_section_contents (obfd, osection, buf, 0, len))
+    warning (_("writing dump file '%s' (%s)"), filename, 
+            bfd_errmsg (bfd_get_error ()));
 }
 
 static void
This page took 0.026902 seconds and 4 git commands to generate.