]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
whpx: Fixed reporting of the CPU context to GDB for 64-bit
authorIvan Shcherbakov <ivan@sysprogs.com>
Wed, 23 Feb 2022 05:15:41 +0000 (21:15 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 15 Mar 2022 10:26:20 +0000 (11:26 +0100)
Make sure that pausing the VM while in 64-bit mode will set the
HF_CS64_MASK flag in env->hflags (see x86_update_hflags() in
target/i386/cpu.c).

Without it, the code in gdbstub.c would only use the 32-bit register values
when debugging 64-bit targets, making debugging effectively impossible.

Signed-off-by: Ivan Shcherbakov <ivan@sysprogs.com>
Message-Id: <00f701d82874$68b02000$3a106000$@sysprogs.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/whpx/whpx-all.c

index c7e25abf42ceff60361dae5a759f64d65d611046..3bc4feba048b119d2bef4ba63974b58b8b63de79 100644 (file)
@@ -604,6 +604,8 @@ static void whpx_get_registers(CPUState *cpu)
         whpx_apic_get(x86_cpu->apic_state);
     }
 
+    x86_update_hflags(env);
+
     return;
 }