softmmu: pass the main loop status to gdb "Wxx" packet
commit66bbe3e9b46112ec2fe35a7d6e79d8a9bb39d14a
authorClément Chigot <chigot@adacore.com>
Tue, 3 Oct 2023 07:14:24 +0000 (3 09:14 +0200)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 12 Oct 2023 02:33:24 +0000 (12 12:33 +1000)
tree637d60dda5f52db0fb2b118fb086b7858e5e27b5
parent0386f39b46a28da87647075f0fc20da4ba1f6478
softmmu: pass the main loop status to gdb "Wxx" packet

gdb_exit function aims to close gdb sessions and sends the exit code of
the current execution. It's being called by qemu_cleanup once the main
loop is over.
Until now, the exit code sent was always 0. Now that hardware can
shutdown this main loop with custom exit codes, these codes must be
transfered to gdb as well.

Signed-off-by: Clément Chigot <chigot@adacore.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20231003071427.188697-3-chigot@adacore.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
include/sysemu/sysemu.h
system/main.c
system/runstate.c