aboutsummaryrefslogtreecommitdiff
path: root/softmmu/cpus.c
diff options
context:
space:
mode:
Diffstat (limited to 'softmmu/cpus.c')
-rw-r--r--softmmu/cpus.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/softmmu/cpus.c b/softmmu/cpus.c
index f3d0c59f78..95c557fac5 100644
--- a/softmmu/cpus.c
+++ b/softmmu/cpus.c
@@ -284,9 +284,17 @@ bool cpu_can_run(CPUState *cpu)
void cpu_handle_guest_debug(CPUState *cpu)
{
- gdb_set_stop_cpu(cpu);
- qemu_system_debug_request();
- cpu->stopped = true;
+ if (replay_running_debug()) {
+ if (!cpu->singlestep_enabled) {
+ cpu_single_step(cpu, SSTEP_ENABLE);
+ } else {
+ cpu_single_step(cpu, 0);
+ }
+ } else {
+ gdb_set_stop_cpu(cpu);
+ qemu_system_debug_request();
+ cpu->stopped = true;
+ }
}
#ifdef CONFIG_LINUX