diff options
author | Clément Chigot <chigot@adacore.com> | 2023-10-03 09:14:27 +0200 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2023-10-12 12:36:37 +1000 |
commit | e216256ae9fc3d1988e3f1af3f644b4dafb79838 (patch) | |
tree | 638a815b75d36fd4c7fd421db36d45235c82fd1a /gdbstub/gdbstub.c | |
parent | 354c96069c4b6af176c03b046087e971ac621177 (diff) |
gdbstub: replace exit calls with proper shutdown for softmmu
This replaces the exit calls by shutdown requests, ensuring a proper
cleanup of Qemu. Features like net/vhost-vdpa.c are expecting
qemu_cleanup to be called to remove their last residuals.
Signed-off-by: Clément Chigot <chigot@adacore.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20231003071427.188697-6-chigot@adacore.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'gdbstub/gdbstub.c')
-rw-r--r-- | gdbstub/gdbstub.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index b1532118d1..1e96a71c0c 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -1324,7 +1324,7 @@ static void handle_v_kill(GArray *params, void *user_ctx) gdb_put_packet("OK"); error_report("QEMU: Terminated via GDBstub"); gdb_exit(0); - exit(0); + gdb_qemu_exit(0); } static const GdbCmdParseEntry gdb_v_commands_table[] = { @@ -1843,7 +1843,8 @@ static int gdb_handle_packet(const char *line_buf) /* Kill the target */ error_report("QEMU: Terminated via GDBstub"); gdb_exit(0); - exit(0); + gdb_qemu_exit(0); + break; case 'D': { static const GdbCmdParseEntry detach_cmd_desc = { |