qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Rowan Hart <rowanbhart@gmail.com>
Cc: qemu-devel@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Alexandre Iooss" <erdnaxe@crans.org>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Mahmoud Mandour" <ma.mandourr@gmail.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v2 1/3] Expose gdb_write_register function to consumers of gdbstub
Date: Thu, 09 Jan 2025 12:03:14 +0000	[thread overview]
Message-ID: <87plkw8a9p.fsf@draig.linaro.org> (raw)
In-Reply-To: <20241206102605.961658-2-rowanbhart@gmail.com> (Rowan Hart's message of "Fri, 6 Dec 2024 02:26:02 -0800")

Rowan Hart <rowanbhart@gmail.com> writes:

> From: novafacing <rowanbhart@gmail.com>

You need to include Signed-of-by tags for anything to get accepted.

>
> ---
>  gdbstub/gdbstub.c      |  2 +-
>  include/exec/gdbstub.h | 14 ++++++++++++++
>  2 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
> index b1def7e71d..7d87a3324c 100644
> --- a/gdbstub/gdbstub.c
> +++ b/gdbstub/gdbstub.c
> @@ -536,7 +536,7 @@ int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg)
>      return 0;
>  }
>  
> -static int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg)
> +int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg)
>  {
>      CPUClass *cc = CPU_GET_CLASS(cpu);
>      GDBRegisterState *r;
> diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
> index d73f424f56..584ed73fc9 100644
> --- a/include/exec/gdbstub.h
> +++ b/include/exec/gdbstub.h
> @@ -118,6 +118,20 @@ const GDBFeature *gdb_find_static_feature(const char *xmlname);
>   */
>  int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
>  
> +/**
> + * gdb_write_register() - Write a register associated with a CPU.
> + * @cpu: The CPU associated with the register.
> + * @buf: The buffer that the register contents will be set to.
> + * @reg: The register's number returned by gdb_find_feature_register().
> + *
> + * The size of @buf must be at least the size of the register being
> + * written.
> + *
> + * Return: The number of written bytes, or 0 if an error occurred (for
> + * example, an unknown register was provided).
> + */
> +int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg);
> +
>  /**
>   * typedef GDBRegDesc - a register description from gdbstub
>   */

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2025-01-09 12:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 10:26 [PATCH v2 0/3] Add additional plugin API functions to read and write memory and registers Rowan Hart
2024-12-06 10:26 ` [PATCH v2 1/3] Expose gdb_write_register function to consumers of gdbstub Rowan Hart
2025-01-09 12:03   ` Alex Bennée [this message]
2024-12-06 10:26 ` [PATCH v2 2/3] Add plugin API functions for register R/W, hwaddr R/W, vaddr W Rowan Hart
2025-01-09 12:22   ` Alex Bennée
2024-12-06 10:26 ` [PATCH v2 3/3] Add inject plugin and x86_64 target for the inject plugin Rowan Hart
2024-12-06 19:57   ` Pierrick Bouvier
2024-12-07  1:02     ` Rowan Hart
2024-12-09 18:38       ` Pierrick Bouvier
2024-12-06 19:43 ` [PATCH v2 0/3] Add additional plugin API functions to read and write memory and registers Pierrick Bouvier
2024-12-07  0:57   ` Rowan Hart
2024-12-09 18:45     ` Pierrick Bouvier
2024-12-10 11:38       ` Alex Bennée
2024-12-10 18:40         ` Pierrick Bouvier

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=87plkw8a9p.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=eduardo@habkost.net \
    --cc=erdnaxe@crans.org \
    --cc=ma.mandourr@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rowanbhart@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).