]> Git Repo - qemu.git/commitdiff
gdbstub: let the debugger resume from guest panicked state
authorPaolo Bonzini <[email protected]>
Mon, 3 Jun 2013 15:06:55 +0000 (17:06 +0200)
committerAnthony Liguori <[email protected]>
Mon, 10 Jun 2013 16:36:11 +0000 (11:36 -0500)
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 <[email protected]>
Reviewed-by: Luiz Capitulino <[email protected]>
Message-id: 1370272015[email protected]
Signed-off-by: Anthony Liguori <[email protected]>
gdbstub.c
vl.c

index e8541f365d3e450784c9ab45a7acd73fe504cef1..94c78ced56b85fe6c7d0164b2ad2437ddd83cad9 100644 (file)
--- 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 47ab45d37a58009875f6e2324a35f04581d6dea0..180fddea3935279bf9925f6a87aaf114e5badb6c 100644 (file)
--- 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 },
 };
This page took 0.030166 seconds and 4 git commands to generate.