summaryrefslogtreecommitdiffstats
path: root/target/openrisc/gdbstub.c
diff options
context:
space:
mode:
authorAlex Bennée2020-03-16 18:21:41 +0100
committerAlex Bennée2020-03-17 18:38:38 +0100
commita010bdbe719c52c8959ca058000d7ac7d559abb8 (patch)
tree97cdc27c71b191e391962e10fc8b602076b388b0 /target/openrisc/gdbstub.c
parenttarget/i386: use gdb_get_reg helpers (diff)
downloadqemu-a010bdbe719c52c8959ca058000d7ac7d559abb8.tar.gz
qemu-a010bdbe719c52c8959ca058000d7ac7d559abb8.tar.xz
qemu-a010bdbe719c52c8959ca058000d7ac7d559abb8.zip
gdbstub: extend GByteArray to read register helpers
Instead of passing a pointer to memory now just extend the GByteArray to all the read register helpers. They can then safely append their data through the normal way. We don't bother with this abstraction for write registers as we have already ensured the buffer being copied from is the correct size. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Damien Hedde <damien.hedde@greensocs.com> Message-Id: <20200316172155.971-15-alex.bennee@linaro.org>
Diffstat (limited to 'target/openrisc/gdbstub.c')
-rw-r--r--target/openrisc/gdbstub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/openrisc/gdbstub.c b/target/openrisc/gdbstub.c
index 0fcdb79668..095bf76c12 100644
--- a/target/openrisc/gdbstub.c
+++ b/target/openrisc/gdbstub.c
@@ -21,7 +21,7 @@
#include "cpu.h"
#include "exec/gdbstub.h"
-int openrisc_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
+int openrisc_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
{
OpenRISCCPU *cpu = OPENRISC_CPU(cs);
CPUOpenRISCState *env = &cpu->env;