From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjWLn-0007zS-S6 for qemu-devel@nongnu.org; Mon, 03 Jun 2013 11:07:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjWLi-00030B-PO for qemu-devel@nongnu.org; Mon, 03 Jun 2013 11:07:11 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:56472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjWLi-0002zq-KY for qemu-devel@nongnu.org; Mon, 03 Jun 2013 11:07:06 -0400 Received: by mail-wi0-f182.google.com with SMTP id c10so2766069wiw.9 for ; Mon, 03 Jun 2013 08:07:06 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 3 Jun 2013 17:06:55 +0200 Message-Id: <1370272015-9659-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1370272015-9659-1-git-send-email-pbonzini@redhat.com> References: <1370272015-9659-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] gdbstub: let the debugger resume from guest panicked state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lersek@redhat.com, lcapitulino@redhat.com While in general we forbid a "continue" from the guest panicked state, it makes sense to have an exception for that when continuing in the debugger. Perhaps the guest entered that state due to a bug, for example, and we want to continue no matter what. Signed-off-by: Paolo Bonzini --- gdbstub.c | 3 +++ vl.c | 1 + 2 files changed, 4 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index e8541f3..94c78ce 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -371,6 +371,9 @@ static inline void gdb_continue(GDBState *s) #ifdef CONFIG_USER_ONLY s->running_state = 1; #else + if (runstate_check(RUN_STATE_GUEST_PANICKED)) { + runstate_set(RUN_STATE_DEBUG); + } if (!runstate_needs_reset()) { vm_start(); } diff --git a/vl.c b/vl.c index 510d2c2..9fcf543 100644 --- a/vl.c +++ b/vl.c @@ -610,6 +610,7 @@ static const RunStateTransition runstate_transitions_def[] = { { RUN_STATE_GUEST_PANICKED, RUN_STATE_PAUSED }, { RUN_STATE_GUEST_PANICKED, RUN_STATE_FINISH_MIGRATE }, + { RUN_STATE_GUEST_PANICKED, RUN_STATE_DEBUG }, { RUN_STATE_MAX, RUN_STATE_MAX }, }; -- 1.8.1.4