[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2] gdbstub: let the debugger resume from guest pan
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 2/2] gdbstub: let the debugger resume from guest panicked state |
Date: |
Mon, 3 Jun 2013 17:06:55 +0200 |
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 <address@hidden>
---
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