Signed-off-by: Mario Fleischmann <[email protected]>
---
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 8166510f06..830854ef72 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 c2941e5c10..e2d848806b 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.
+ * @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