summaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorIvan Shcherbakov <ivan@sysprogs.com>2022-03-02 17:28:33 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2022-04-06 14:31:55 +0200
commitd7482ffe9756919531307330fd1c6dbec66e8c32 (patch)
tree96388804c4a7aa891af8f29110c132538babdfb2 /include/sysemu
parent9d734b85ed8d89bb9ab8c456b4df23dedf8dbf76 (diff)
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>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/accel-ops.h1
-rw-r--r--include/sysemu/runstate.h8
2 files changed, 8 insertions, 1 deletions
diff --git a/include/sysemu/accel-ops.h b/include/sysemu/accel-ops.h
index 6013c9444c..a0572ea87a 100644
--- a/include/sysemu/accel-ops.h
+++ b/include/sysemu/accel-ops.h
@@ -38,6 +38,7 @@ struct AccelOpsClass {
void (*synchronize_post_init)(CPUState *cpu);
void (*synchronize_state)(CPUState *cpu);
void (*synchronize_pre_loadvm)(CPUState *cpu);
+ void (*synchronize_pre_resume)(bool step_pending);
void (*handle_interrupt)(CPUState *cpu, int mask);
diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h
index c3f445dd26..f3ed52548e 100644
--- a/include/sysemu/runstate.h
+++ b/include/sysemu/runstate.h
@@ -34,7 +34,13 @@ static inline bool shutdown_caused_by_guest(ShutdownCause cause)
}
void vm_start(void);
-int vm_prepare_start(void);
+
+/**
+ * vm_prepare_start: Prepare for starting/resuming the VM
+ *
+ * @step_pending: whether any of the CPUs is about to be single-stepped by gdb
+ */
+int vm_prepare_start(bool step_pending);
int vm_stop(RunState state);
int vm_stop_force_state(RunState state);
int vm_shutdown(void);