diff options
author | Alex Bennée | 2020-03-16 18:21:41 +0100 |
---|---|---|
committer | Alex Bennée | 2020-03-17 18:38:38 +0100 |
commit | a010bdbe719c52c8959ca058000d7ac7d559abb8 (patch) | |
tree | 97cdc27c71b191e391962e10fc8b602076b388b0 /target/lm32/cpu.h | |
parent | target/i386: use gdb_get_reg helpers (diff) | |
download | qemu-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/lm32/cpu.h')
-rw-r--r-- | target/lm32/cpu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/lm32/cpu.h b/target/lm32/cpu.h index 064c6b1267..01d408eb55 100644 --- a/target/lm32/cpu.h +++ b/target/lm32/cpu.h @@ -202,7 +202,7 @@ void lm32_cpu_do_interrupt(CPUState *cpu); bool lm32_cpu_exec_interrupt(CPUState *cs, int int_req); void lm32_cpu_dump_state(CPUState *cpu, FILE *f, int flags); hwaddr lm32_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); -int lm32_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg); +int lm32_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int lm32_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); typedef enum { |