mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
gdbstub: Expose gdb_write_register function to consumers of gdbstub
This patch exposes the gdb_write_register function from gdbstub/gdbstub.c via the exec/gdbstub.h header file to support use in plugins to write register contents. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Julian Ganz <neither@nut.email> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Rowan Hart <rowanbhart@gmail.com> Message-ID: <20250624175351.440780-2-rowanbhart@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250627112512.1880708-6-alex.bennee@linaro.org>
This commit is contained in:
parent
b8e6bfd669
commit
1bb6403a34
2 changed files with 15 additions and 1 deletions
|
@ -535,7 +535,7 @@ int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg)
|
||||||
return 0;
|
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;
|
GDBRegisterState *r;
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,20 @@ const GDBFeature *gdb_find_static_feature(const char *xmlname);
|
||||||
*/
|
*/
|
||||||
int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
|
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
|
* typedef GDBRegDesc - a register description from gdbstub
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue