* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / remote-utils.c
index ba7d29712d9fc7c14c8f443358bffbfc5e0200f7..ddd5239014a0b2db7d3a2ad89493512d42ac19cd 100644 (file)
@@ -102,8 +102,6 @@ sr_scan_args(proto, args)
   int n;
   char *p, *q;
 
-  extern int strtol();
-
   /* if no args, then nothing to do. */
   if (args == NULL || *args == '\0')
     return;
@@ -396,6 +394,7 @@ sr_com (args, fromtty)
 
   sr_write_cr (args);
   sr_write ("\030", 1);
+  registers_changed ();
   gr_expect_prompt ();
 }
 
@@ -648,8 +647,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 +686,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.023952 seconds and 4 git commands to generate.