This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] cli/cli-dump.c (dump_bfd_file): Check error return and warn.
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 01 Mar 2011 17:10:44 -0800
- Subject: [commit] cli/cli-dump.c (dump_bfd_file): Check error return and warn.
checked in.
2011-03-01 Michael Snyder <msnyder@vmware.com>
* cli/cli-dump.c (dump_bfd_file): Check error return and warn.
Index: cli/cli-dump.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-dump.c,v
retrieving revision 1.42
diff -u -p -u -p -r1.42 cli-dump.c
--- cli/cli-dump.c 1 Mar 2011 23:42:44 -0000 1.42
+++ cli/cli-dump.c 2 Mar 2011 01:08:35 -0000
@@ -202,7 +202,9 @@ dump_bfd_file (const char *filename, con
| 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