Re: [Qemu-devel] [PATCH] gdbstub: shutdown guest when the target is killed

2019-01-24 Thread KONRAD Frederic
Le 1/24/19 à 2:04 PM, Peter Maydell a écrit : On Thu, 24 Jan 2019 at 12:47, KONRAD Frederic wrote: Under MinGW when the target is killed no "W00" packet are received by GDB because gdbstub takes the "exit(0)" path. Why is this a problem? The gdb protocol documentation for the 'k' packet s

Re: [Qemu-devel] [PATCH] gdbstub: shutdown guest when the target is killed

2019-01-24 Thread Peter Maydell
On Thu, 24 Jan 2019 at 12:47, KONRAD Frederic wrote: > > Under MinGW when the target is killed no "W00" packet are received by GDB > because gdbstub takes the "exit(0)" path. Why is this a problem? The gdb protocol documentation for the 'k' packet says: # If the target system immediately closes

[Qemu-devel] [PATCH] gdbstub: shutdown guest when the target is killed

2019-01-24 Thread KONRAD Frederic
Under MinGW when the target is killed no "W00" packet are received by GDB because gdbstub takes the "exit(0)" path. So replace the "exit(0)" call by a normal guest shutdown so the "W00" packet has a chance to be sent in "gdb_cleanup". Signed-off-by: KONRAD Frederic --- gdbstub.c | 5 + 1 fil