qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: lersek@redhat.com, lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH 2/2] gdbstub: let the debugger resume from guest panicked state
Date: Mon,  3 Jun 2013 17:06:55 +0200	[thread overview]
Message-ID: <1370272015-9659-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1370272015-9659-1-git-send-email-pbonzini@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 <pbonzini@redhat.com>
---
 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

  parent reply	other threads:[~2013-06-03 15:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 15:06 [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups Paolo Bonzini
2013-06-03 15:06 ` [Qemu-devel] [PATCH 1/2] gdbstub: fix for commit 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc Paolo Bonzini
2013-06-03 15:06 ` Paolo Bonzini [this message]
2013-06-03 15:26 ` [Qemu-devel] [PATCH 0/2] gdbstub runstate check follow-ups Luiz Capitulino
2013-06-07 23:33 ` Andreas Färber
2013-06-10 21:48 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370272015-9659-3-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=lersek@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).