From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui0uc-0005ro-Ec for qemu-devel@nongnu.org; Thu, 30 May 2013 07:20:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ui0uV-0006zW-Ig for qemu-devel@nongnu.org; Thu, 30 May 2013 07:20:54 -0400 Received: from mail-ea0-x22d.google.com ([2a00:1450:4013:c01::22d]:51863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui0uV-0006zH-BG for qemu-devel@nongnu.org; Thu, 30 May 2013 07:20:47 -0400 Received: by mail-ea0-f173.google.com with SMTP id n15so151420ead.32 for ; Thu, 30 May 2013 04:20:46 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 30 May 2013 13:20:40 +0200 Message-Id: <1369912840-18577-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] gdbstub: do not restart crashed guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jan Kiszka If a guest has crashed with an internal error or similar, detaching gdb (or any other debugger action) should not restart it. Cc: Jan Kiszka Signed-off-by: Paolo Bonzini --- gdbstub.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdbstub.c b/gdbstub.c index e80e1d3..90e54cb 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -371,7 +371,9 @@ static inline void gdb_continue(GDBState *s) #ifdef CONFIG_USER_ONLY s->running_state = 1; #else - vm_start(); + if (runstate_check(RUN_STATE_DEBUG)) { + vm_start(); + } #endif } -- 1.8.1.4