Adjust debug handling
authorBlue Swirl <blauwirbel@gmail.com>
Mon, 29 Mar 2010 19:23:46 +0000 (19:23 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Mon, 29 Mar 2010 19:23:46 +0000 (19:23 +0000)
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
vl.c

diff --git a/vl.c b/vl.c
index 8a73235adedc5dfae28a68f92ccdef6592b93492..a2869b8dbe6bdc26169524fbd12bbdcc1c12b430 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2920,7 +2920,7 @@ static bool tcg_cpu_exec(void)
 
         if (ret == EXCP_DEBUG) {
             gdb_set_stop_cpu(env);
-            debug_requested = 1;
+            debug_requested = EXCP_DEBUG;
             break;
         }
     }
@@ -2983,8 +2983,8 @@ static void main_loop(void)
 #endif
         } while (vm_can_run());
 
-        if (qemu_debug_requested()) {
-            vm_stop(EXCP_DEBUG);
+        if ((r = qemu_debug_requested())) {
+            vm_stop(r);
         }
         if (qemu_shutdown_requested()) {
             monitor_protocol_event(QEVENT_SHUTDOWN, NULL);