gdbstub: do not restart crashed guest
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 30 May 2013 11:20:40 +0000 (13:20 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 30 May 2013 16:45:03 +0000 (11:45 -0500)
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>
gdbstub.c

index e80e1d3..90e54cb 100644 (file)
--- 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
 }