mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
b7b8756a9c
commit
a010bdbe71
41 changed files with 179 additions and 149 deletions
|
@ -280,7 +280,7 @@ void alpha_cpu_do_interrupt(CPUState *cpu);
|
|||
bool alpha_cpu_exec_interrupt(CPUState *cpu, int int_req);
|
||||
void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags);
|
||||
hwaddr alpha_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
|
||||
int alpha_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
|
||||
int alpha_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
|
||||
int alpha_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
|
||||
void alpha_cpu_do_unaligned_access(CPUState *cpu, vaddr addr,
|
||||
MMUAccessType access_type,
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "cpu.h"
|
||||
#include "exec/gdbstub.h"
|
||||
|
||||
int alpha_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
|
||||
int alpha_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
|
||||
{
|
||||
AlphaCPU *cpu = ALPHA_CPU(cs);
|
||||
CPUAlphaState *env = &cpu->env;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue