Alex Bennée <alex.ben...@linaro.org> writes: > The process was pretty similar to the softmmu move except we take the > time to split stuff between user.c and user-target.c to avoid as much > target specific compilation as possible. We also start to make use of > our shiny new header scheme so the user-only helpers can be included > without the rest of the exec/gsbstub.h cruft. > > As before we: > > - convert some helpers to public gdb_ functions (via internals.h) > - splitting some functions into user and softmmu versions > > Signed-off-by: Alex Bennée <alex.ben...@linaro.org>
Reviewed-by: Fabiano Rosas <faro...@suse.de> Just one detail below: > diff --git a/gdbstub/user.c b/gdbstub/user.c > index a5f370bcf9..3492d9b68a 100644 > --- a/gdbstub/user.c > +++ b/gdbstub/user.c > @@ -10,11 +10,354 @@ > */ ... > +/* > + * Resume execution, for user-mode emulation it's equivalent to > + * gdb_continue. > + */ > +int gdb_continue_partial(char *newstates) > +{ > + CPUState *cpu; > + int res = 0; This variable could be dropped. > + /* > + * This is not exactly accurate, but it's an improvement compared to the > + * previous situation, where only one CPU would be single-stepped. > + */ > + CPU_FOREACH(cpu) { > + if (newstates[cpu->cpu_index] == 's') { > + trace_gdbstub_op_stepping(cpu->cpu_index); > + cpu_single_step(cpu, gdbserver_state.sstep_flags); > + } > + } > + gdbserver_state.connection->running_state = 1; > + return res; > +}