To resolve the issue to debug switchable targets, this serias introduces basic infrastructure for gdbstub and enable support for ARM and RISC-V targets.
For example, now there is no problem to debug an big-enadian aarch64 target on x86 host. $ qemu-system-aarch64 -gdb tcp::1234,endianness=big ... Changbin Du (3): gdbstub: add basic infrastructure to support switchable endianness arm: gdbstub: add support for switchable endianness riscv: gdbstub: add support for switchable endianness configs/targets/aarch64-softmmu.mak | 1 + configs/targets/arm-softmmu.mak | 1 + configs/targets/riscv32-softmmu.mak | 1 + configs/targets/riscv64-softmmu.mak | 1 + gdbstub.c | 11 +++++ include/exec/gdbstub.h | 72 +++++++++++++++++++++-------- qemu-options.hx | 7 ++- softmmu/vl.c | 50 +++++++++++++++++++- target/arm/gdbstub.c | 2 +- target/arm/gdbstub64.c | 2 +- target/riscv/gdbstub.c | 12 ++--- 11 files changed, 131 insertions(+), 29 deletions(-) -- 2.32.0