All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: f4bug@amsat.org, mads@ynddal.dk,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Laurent Vivier" <laurent@vivier.eu>
Subject: Re: [PATCH v1 09/10] gdbstub: move chunks of user code into own files
Date: Fri, 16 Dec 2022 13:38:11 -0300	[thread overview]
Message-ID: <87mt7ngv7w.fsf@suse.de> (raw)
In-Reply-To: <20221216112206.3171578-10-alex.bennee@linaro.org>

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	other threads:[~2022-12-16 16:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 11:21 [PATCH v1 00/10] split user and system code in gdbstub Alex Bennée
2022-12-16 11:21 ` [PATCH v1 01/10] gdbstub/internals.h: clean up include guard Alex Bennée
2022-12-16 19:17   ` Richard Henderson
2022-12-16 11:21 ` [PATCH v1 02/10] gdbstub: fix-up copyright and license files Alex Bennée
2022-12-16 19:39   ` Richard Henderson
2022-12-16 11:21 ` [PATCH v1 03/10] gdbstub: Make syscall_complete/[gs]et_reg target-agnostic typedefs Alex Bennée
2022-12-16 11:22 ` [PATCH v1 04/10] gdbstub: split GDBConnection from main structure Alex Bennée
2022-12-16 15:29   ` Fabiano Rosas
2022-12-21 16:56     ` Alex Bennée
2022-12-16 20:11   ` Richard Henderson
2022-12-16 11:22 ` [PATCH v1 05/10] gdbstub: move GDBState to shared internals header Alex Bennée
2022-12-16 20:02   ` Richard Henderson
2022-12-16 11:22 ` [PATCH v1 06/10] includes: move tb_flush into its own header Alex Bennée
2022-12-16 20:01   ` Richard Henderson
2022-12-16 11:22 ` [PATCH v1 07/10] includes: add new gdbstub include directory Alex Bennée
2022-12-16 20:37   ` Richard Henderson
2022-12-16 11:22 ` [PATCH v1 08/10] gdbstub: move chunk of softmmu functionality to own file Alex Bennée
2022-12-16 15:52   ` Fabiano Rosas
2022-12-16 20:27   ` Richard Henderson
2022-12-16 11:22 ` [PATCH v1 09/10] gdbstub: move chunks of user code into own files Alex Bennée
2022-12-16 16:38   ` Fabiano Rosas [this message]
2022-12-16 11:22 ` [PATCH v1 10/10] gdbstub: retire exec/gdbstub.h Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mt7ngv7w.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=laurent@vivier.eu \
    --cc=mads@ynddal.dk \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.