]> git.proxmox.com Git - qemu.git/blobdiff - gdbstub.c
Drop the vm_running global variable
[qemu.git] / gdbstub.c
index 75b52e2c2d98d62c0fede7126bcd63bffa8550fe..12dd100af47291915efe7894cb958dcb052f9de1 100644 (file)
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2534,7 +2534,7 @@ static void gdb_read_byte(GDBState *s, int ch)
         if (ch != '$')
             return;
     }
-    if (vm_running) {
+    if (runstate_is_running()) {
         /* when the CPU is running, we cannot do anything except stop
            it when receiving a char */
         vm_stop(RSTATE_PAUSED);
@@ -2839,7 +2839,7 @@ static int gdb_monitor_write(CharDriverState *chr, const uint8_t *buf, int len)
 #ifndef _WIN32
 static void gdb_sigterm_handler(int signal)
 {
-    if (vm_running) {
+    if (runstate_is_running()) {
         vm_stop(RSTATE_PAUSED);
     }
 }