aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2007-05-10 21:19:41 +0000
committerPedro Alves <palves@redhat.com>2007-05-10 21:19:41 +0000
commit4ddda9b5ebfd271d7f6424bc40f4e389813250cc (patch)
treefd224eb5d5c48482f2b6b1eda78879a943a28c1b /gdb/remote.c
parent362f854eaa8c607074c557abcfee48463f28f494 (diff)
downloadgdb-4ddda9b5ebfd271d7f6424bc40f4e389813250cc.zip
gdb-4ddda9b5ebfd271d7f6424bc40f4e389813250cc.tar.gz
gdb-4ddda9b5ebfd271d7f6424bc40f4e389813250cc.tar.bz2
* remote.c (remote_detach): Error out if remote can't detach.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index f1d0710..d21b7b6 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -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 ())