On 4/14/20 1:28 PM, Philippe Mathieu-Daudé wrote:
GByteArray type has should not be treated as a u8[] buffer. The GLib Byte Arrays API should be used instead. Rename the 'mem_buf' variable as 'array' to make it more obvious in the code.
I forgot to mention this variable was used as u8[] buffer prior to commit a010bdbe719 ("extend GByteArray to read register helpers").
Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> --- Based-on: <20200414111846.27495-1-phi...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> --- include/exec/gdbstub.h | 34 +++++++------- include/hw/core/cpu.h | 2 +- target/alpha/cpu.h | 2 +- target/arm/cpu.h | 4 +- target/cris/cpu.h | 4 +- target/hppa/cpu.h | 2 +- target/i386/cpu.h | 2 +- target/lm32/cpu.h | 2 +- target/m68k/cpu.h | 2 +- target/microblaze/cpu.h | 2 +- target/mips/internal.h | 2 +- target/openrisc/cpu.h | 2 +- target/ppc/cpu.h | 4 +- target/riscv/cpu.h | 2 +- target/rx/cpu.h | 2 +- target/s390x/internal.h | 2 +- target/sh4/cpu.h | 2 +- target/sparc/cpu.h | 2 +- target/xtensa/cpu.h | 2 +- gdbstub.c | 6 +-- hw/core/cpu.c | 3 +- target/alpha/gdbstub.c | 4 +- target/arm/gdbstub.c | 10 ++-- target/arm/gdbstub64.c | 10 ++-- target/cris/gdbstub.c | 34 +++++++------- target/hppa/gdbstub.c | 6 +-- target/i386/gdbstub.c | 92 ++++++++++++++++++------------------- target/lm32/gdbstub.c | 18 ++++---- target/m68k/gdbstub.c | 10 ++-- target/m68k/helper.c | 24 +++++----- target/microblaze/gdbstub.c | 6 +-- target/mips/gdbstub.c | 30 ++++++------ target/nios2/cpu.c | 8 ++-- target/openrisc/gdbstub.c | 10 ++-- target/riscv/gdbstub.c | 6 +-- target/rx/gdbstub.c | 22 ++++----- target/s390x/gdbstub.c | 28 +++++------ target/sh4/gdbstub.c | 38 +++++++-------- target/sparc/gdbstub.c | 46 +++++++++---------- target/xtensa/gdbstub.c | 20 ++++---- 40 files changed, 254 insertions(+), 253 deletions(-)