aboutsummaryrefslogtreecommitdiff
path: root/target/hppa
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2020-03-16 17:21:41 +0000
committerAlex Bennée <alex.bennee@linaro.org>2020-03-17 17:38:38 +0000
commita010bdbe719c52c8959ca058000d7ac7d559abb8 (patch)
tree97cdc27c71b191e391962e10fc8b602076b388b0 /target/hppa
parentb7b8756a9cd0cd63488a9d9fc9aee5400574c30b (diff)
downloadqemu-a010bdbe719c52c8959ca058000d7ac7d559abb8.zip
qemu-a010bdbe719c52c8959ca058000d7ac7d559abb8.tar.gz
qemu-a010bdbe719c52c8959ca058000d7ac7d559abb8.tar.bz2
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/hppa')
-rw-r--r--target/hppa/cpu.h2
-rw-r--r--target/hppa/gdbstub.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h
index 6713d04..801a4fb 100644
--- a/target/hppa/cpu.h
+++ b/target/hppa/cpu.h
@@ -321,7 +321,7 @@ void cpu_hppa_change_prot_id(CPUHPPAState *env);
int cpu_hppa_signal_handler(int host_signum, void *pinfo, void *puc);
hwaddr hppa_cpu_get_phys_page_debug(CPUState *cs, vaddr addr);
-int hppa_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
+int hppa_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
int hppa_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
void hppa_cpu_do_interrupt(CPUState *cpu);
bool hppa_cpu_exec_interrupt(CPUState *cpu, int int_req);
diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c
index 341888a..a6428a2 100644
--- a/target/hppa/gdbstub.c
+++ b/target/hppa/gdbstub.c
@@ -21,7 +21,7 @@
#include "cpu.h"
#include "exec/gdbstub.h"
-int hppa_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
+int hppa_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
{
HPPACPU *cpu = HPPA_CPU(cs);
CPUHPPAState *env = &cpu->env;