qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 09/10] gdbstub: move chunks of user code into own files


From: Fabiano Rosas
Subject: Re: [PATCH v1 09/10] gdbstub: move chunks of user code into own files
Date: Fri, 16 Dec 2022 13:38:11 -0300

Alex Bennée <alex.bennee@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.bennee@linaro.org>

Reviewed-by: Fabiano Rosas <farosas@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;
> +}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]