mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
whpx: Added support for breakpoints and stepping
Below is the updated version of the patch adding debugging support to WHPX. It incorporates feedback from Alex Bennée and Peter Maydell regarding not changing the emulation logic depending on the gdb connection status. Instead of checking for an active gdb connection to determine whether QEMU should intercept the INT1 exceptions, it now checks whether any breakpoints have been set, or whether gdb has explicitly requested one or more CPUs to do single-stepping. Having none of these condition present now has the same effect as not using gdb at all. Message-Id: <0e7f01d82e9e$00e9c360$02bd4a20$@sysprogs.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
9d734b85ed
commit
d7482ffe97
8 changed files with 815 additions and 18 deletions
|
@ -5,9 +5,39 @@
|
|||
#include <WinHvPlatform.h>
|
||||
#include <WinHvEmulation.h>
|
||||
|
||||
typedef enum WhpxBreakpointState {
|
||||
WHPX_BP_CLEARED = 0,
|
||||
WHPX_BP_SET_PENDING,
|
||||
WHPX_BP_SET,
|
||||
WHPX_BP_CLEAR_PENDING,
|
||||
} WhpxBreakpointState;
|
||||
|
||||
struct whpx_breakpoint {
|
||||
vaddr address;
|
||||
WhpxBreakpointState state;
|
||||
uint8_t original_instruction;
|
||||
};
|
||||
|
||||
struct whpx_breakpoint_collection {
|
||||
int allocated, used;
|
||||
struct whpx_breakpoint data[0];
|
||||
};
|
||||
|
||||
struct whpx_breakpoints {
|
||||
int original_address_count;
|
||||
vaddr *original_addresses;
|
||||
|
||||
struct whpx_breakpoint_collection *breakpoints;
|
||||
};
|
||||
|
||||
struct whpx_state {
|
||||
uint64_t mem_quota;
|
||||
WHV_PARTITION_HANDLE partition;
|
||||
uint64_t exception_exit_bitmap;
|
||||
int32_t running_cpus;
|
||||
struct whpx_breakpoints breakpoints;
|
||||
bool step_pending;
|
||||
|
||||
bool kernel_irqchip_allowed;
|
||||
bool kernel_irqchip_required;
|
||||
bool apic_in_platform;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue