This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]