diff options
| author | Alex Bennée <alex.bennee@linaro.org> | 2020-03-16 17:21:41 +0000 |
|---|---|---|
| committer | Alex Bennée <alex.bennee@linaro.org> | 2020-03-17 17:38:38 +0000 |
| commit | a010bdbe719c52c8959ca058000d7ac7d559abb8 (patch) | |
| tree | 97cdc27c71b191e391962e10fc8b602076b388b0 /include/hw/core/cpu.h | |
| parent | b7b8756a9cd0cd63488a9d9fc9aee5400574c30b (diff) | |
| download | focaccia-qemu-a010bdbe719c52c8959ca058000d7ac7d559abb8.tar.gz focaccia-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 'include/hw/core/cpu.h')
| -rw-r--r-- | include/hw/core/cpu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 73e9a869a4..e1d6ee00b4 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -195,7 +195,7 @@ typedef struct CPUClass { hwaddr (*get_phys_page_attrs_debug)(CPUState *cpu, vaddr addr, MemTxAttrs *attrs); int (*asidx_from_attrs)(CPUState *cpu, MemTxAttrs attrs); - int (*gdb_read_register)(CPUState *cpu, uint8_t *buf, int reg); + int (*gdb_read_register)(CPUState *cpu, GByteArray *buf, int reg); int (*gdb_write_register)(CPUState *cpu, uint8_t *buf, int reg); bool (*debug_check_watchpoint)(CPUState *cpu, CPUWatchpoint *wp); void (*debug_excp_handler)(CPUState *cpu); |