[PATCH 0/3] Risc-V/gdb: replace exit(0) with proper shutdown

Clément Chigot posted 3 patches 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230818090224.409192-1-chigot@adacore.com
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Alistair Francis <Alistair.Francis@wdc.com>, Bin Meng <bin.meng@windriver.com>, Palmer Dabbelt <palmer@dabbelt.com>
There is a newer version of this series
gdbstub/gdbstub.c     |  3 +--
gdbstub/softmmu.c     | 11 +++++++++++
gdbstub/user.c        |  2 ++
hw/char/riscv_htif.c  | 12 +++++++++++-
hw/misc/sifive_test.c |  4 +++-
5 files changed, 28 insertions(+), 4 deletions(-)
[PATCH 0/3] Risc-V/gdb: replace exit(0) with proper shutdown
Posted by Clément Chigot 9 months ago
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.

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     | 11 +++++++++++
 gdbstub/user.c        |  2 ++
 hw/char/riscv_htif.c  | 12 +++++++++++-
 hw/misc/sifive_test.c |  4 +++-
 5 files changed, 28 insertions(+), 4 deletions(-)

-- 
2.25.1