Skip to content

Commit

Permalink
gdbstub: let the debugger resume from guest panicked state
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Message-id: 1370272015-9659-3-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  • Loading branch information
bonzini authored and Anthony Liguori committed Jun 10, 2013
1 parent 26ac7a3 commit bc7d0e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gdbstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
1 change: 1 addition & 0 deletions vl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
};
Expand Down

0 comments on commit bc7d0e6

Please sign in to comment.