aboutsummaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-05-30 13:20:40 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-05-30 11:45:03 -0500
commit87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc (patch)
tree58c0b339ce96601d8bc49f790b7f98d06389780c /gdbstub.c
parentbbfa18fca4e44ff9c23d36b50d8a998af9c9e9fc (diff)
downloadqemu-87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc.zip
qemu-87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc.tar.gz
qemu-87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc.tar.bz2
gdbstub: do not restart crashed guest
If a guest has crashed with an internal error or similar, detaching gdb (or any other debugger action) should not restart it. Cc: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1369912840-18577-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdbstub.c b/gdbstub.c
index e80e1d3..90e54cb 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -371,7 +371,9 @@ static inline void gdb_continue(GDBState *s)
#ifdef CONFIG_USER_ONLY
s->running_state = 1;
#else
- vm_start();
+ if (runstate_check(RUN_STATE_DEBUG)) {
+ vm_start();
+ }
#endif
}