@@ -2497,6 +2497,8 @@ bool gdb_try_stop(void)
return false;
}
+ pause_all_vcpus();
+
gdbserver_state.allow_stop_reply = false;
return true;
}
@@ -458,6 +458,7 @@ static void disable_gdbstub(CPUState *thread_cpu)
cpu_breakpoint_remove_all(cpu, BP_GDB);
/* no cpu_watchpoint_remove_all for user-mode */
cpu_single_step(cpu, 0);
+ cpu_resume(cpu);
}
tb_flush(thread_cpu);
}
@@ -650,9 +651,16 @@ int gdb_continue_partial(char *newstates)
* previous situation, where only one CPU would be single-stepped.
*/
CPU_FOREACH(cpu) {
- if (newstates[cpu->cpu_index] == 's') {
+ switch (newstates[cpu->cpu_index]) {
+ case 's':
trace_gdbstub_op_stepping(cpu->cpu_index);
cpu_single_step(cpu, gdbserver_state.sstep_flags);
+ QEMU_FALLTHROUGH;
+ case 'c':
+ case 'C':
+ case 'S':
+ cpu_resume(cpu);
+ break;
}
}
gdbserver_user_state.running_state = 1;
This is required by the GDB remote protocol. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> --- gdbstub/gdbstub.c | 2 ++ gdbstub/user.c | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-)