* corelow.c, exec.c, inftarg.c, m3-nat.c, op50-rom.c, procfs.c,
[deliverable/binutils-gdb.git] / gdb / remote-utils.c
index 482e2476b6403f565c595780e08d8b85258e6423..f1e949a8b293ae81dcf3d09e16ab4c557506f7a7 100644 (file)
@@ -206,7 +206,7 @@ gr_open(args, from_tty, gr)
       if (baud_rate != -1)
        printf_filtered (" at baud rate of %d",
                         baud_rate);
-      print_filtered ("\n");
+      printf_filtered ("\n");
     }
 
   push_target(gr->ops);
@@ -648,8 +648,13 @@ gr_load_image (args, fromtty)
   abfd = bfd_openr (args, (char *) 0);
 
   if (!abfd)
+    /* FIXME: should be using bfd_errmsg, not assuming it was
+       bfd_error_system_call.  */
     perror_with_name (args);
 
+  /* FIXME: should be checking for errors from bfd_close (for one thing,
+     on error it does not free all the storage associated with the
+     bfd).  */
   old_cleanups = make_cleanup (bfd_close, abfd);
 
   QUIT;
@@ -682,7 +687,9 @@ gr_load_image (args, fromtty)
 
   free (buffer);
   write_pc (bfd_get_start_address (abfd));
-  bfd_close (abfd);
+  if (!bfd_close (abfd))
+    warning ("cannot close \"%s\": %s",
+            args, bfd_errmsg (bfd_get_error ()));
   discard_cleanups (old_cleanups);
 }
 
This page took 0.023504 seconds and 4 git commands to generate.