Skip to content

Commit

Permalink
whpx: Fixed reporting of the CPU context to GDB for 64-bit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sysprogs authored and bonzini committed Feb 28, 2022
1 parent 00483d3 commit 3e02040
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions target/i386/whpx/whpx-all.c
Expand Up @@ -604,6 +604,8 @@ static void whpx_get_registers(CPUState *cpu)
whpx_apic_get(x86_cpu->apic_state);
}

x86_update_hflags(env);

return;
}

Expand Down

0 comments on commit 3e02040

Please sign in to comment.