On Wed, 30 Apr 2025 08:27, Mario Fleischmann <mario.fleischm...@lauterbach.com> wrote: >Signed-off-by: Mario Fleischmann <mario.fleischm...@lauterbach.com> >--- > gdbstub/gdbstub.c | 2 +- > include/exec/gdbstub.h | 10 ++++++++++ > 2 files changed, 11 insertions(+), 1 deletion(-) > >diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c >index 291ac55..6ace944 100644 >--- a/gdbstub/gdbstub.c >+++ b/gdbstub/gdbstub.c >@@ -527,7 +527,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) > { > GDBRegisterState *r; > >diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h >index c2941e5..e2d8488 100644 >--- a/include/exec/gdbstub.h >+++ b/include/exec/gdbstub.h >@@ -130,6 +130,16 @@ 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. >+ * @mem_buf: The buffer that the register will be written from.
I think this is more explanatory: "The buffer holding the bytes value that will be written to the register." Either way, Reviewed-by: Manos Pitsidianakis <manos.pitsidiana...@linaro.org> >+ * @reg: The register's number returned by gdb_find_feature_register(). >+ * >+ * Return: The number of written bytes. >+ */ >+int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg); >+ > /** > * typedef GDBRegDesc - a register description from gdbstub > */ >-- >2.34.1 > >