]> git.proxmox.com Git - qemu.git/blobdiff - gdbstub.c
vfio-pci: Enable PCIe extended config space
[qemu.git] / gdbstub.c
index e62dc798c3136f1f0e152f9458fe50b3e18328c6..6cd26f161939870305f1076e242087336278e140 100644 (file)
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2401,9 +2401,10 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
             thread = strtoull(p+16, (char **)&p, 16);
             env = find_cpu(thread);
             if (env != NULL) {
+                CPUState *cpu = ENV_GET_CPU(env);
                 cpu_synchronize_state(env);
                 len = snprintf((char *)mem_buf, sizeof(mem_buf),
-                               "CPU#%d [%s]", env->cpu_index,
+                               "CPU#%d [%s]", cpu->cpu_index,
                                env->halted ? "halted " : "running");
                 memtohex(buf, mem_buf, len);
                 put_packet(s, buf);