From 4ddda9b5ebfd271d7f6424bc40f4e389813250cc Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 10 May 2007 21:19:41 +0000 Subject: [PATCH] * remote.c (remote_detach): Error out if remote can't detach. --- gdb/ChangeLog | 4 ++++ gdb/remote.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1c18abce5e5..06d1df0dbf7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2007-05-10 Pedro Alves + + * remote.c (remote_detach): Error out if remote can't detach. + 2007-05-10 Luis Machado * rs6000-tdep.c: (deal_with_atomic_sequence) Stores branch diff --git a/gdb/remote.c b/gdb/remote.c index f1d071091e7..d21b7b69f22 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 ()) -- 2.30.2