* remote.c (remote_detach): Error out if remote can't detach.
authorPedro Alves <palves@redhat.com>
Thu, 10 May 2007 21:19:41 +0000 (21:19 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 10 May 2007 21:19:41 +0000 (21:19 +0000)
gdb/ChangeLog
gdb/remote.c

index 1c18abce5e58199bca6c01d77572a8b2c95aa619..06d1df0dbf7651649e96970f7d73b1449574724c 100644 (file)
@@ -1,3 +1,7 @@
+2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
+
+       * remote.c (remote_detach): Error out if remote can't detach.
+
 2007-05-10  Luis Machado  <luisgpm@br.ibm.com>
 
        * rs6000-tdep.c: (deal_with_atomic_sequence) Stores branch
index f1d071091e7ea2fc8bb8c90633b29398d8dd5c80..d21b7b69f22ccb3085977de5f4cae2bd675126b1 100644 (file)
@@ -2600,7 +2600,11 @@ remote_detach (char *args, int from_tty)
 
   /* Tell the remote target to detach.  */
   strcpy (rs->buf, "D");
-  remote_send (&rs->buf, &rs->buf_size);
+  putpkt (rs->buf);
+  getpkt (&rs->buf, &rs->buf_size, 0);
+
+  if (rs->buf[0] == 'E')
+    error (_("Can't detach process."));
 
   /* Unregister the file descriptor from the event loop.  */
   if (target_is_async_p ())