This serie replaces some of the call to exit(0) in hardware used by Risc-V boards or made when gdb is requested to exit. Otherwise, the gdb connection can be too abruptly disconnected resulting in the last gdb packet "Wxx" being not sent.
As qemu_system_shutdown_request doesn't allow to pass the exit code, only perform the above modification on a sucessful exit. Difference with v1: - avoid sending a shutdown request in gdb_exit if one has already been set. Clément Chigot (3): hw/misc/sifive_test.c: replace exit(0) with proper shutdown hw/char: riscv_htif: replace exit(0) with proper shutdown gdbstub: replace exit(0) with proper shutdown gdbstub/gdbstub.c | 3 +-- gdbstub/softmmu.c | 13 +++++++++++++ gdbstub/user.c | 2 ++ hw/char/riscv_htif.c | 12 +++++++++++- hw/misc/sifive_test.c | 4 +++- 5 files changed, 30 insertions(+), 4 deletions(-) -- 2.25.1