From 1bb982b8fc2f98246d47c83833c20bf858d649f4 Mon Sep 17 00:00:00 2001 From: KONRAD Frederic Date: Tue, 20 Mar 2018 10:39:33 +0100 Subject: gdbstub: send a termination packet instead of crashing gdb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the commit: commit 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268 Author: Stefan Hajnoczi Date: Wed Mar 7 14:42:05 2018 +0000 vl: introduce vm_shutdown() GDB crashes when qemu exits (at least on sparc-softmmu): Remote communication error. Target disconnected.: Connection reset by peer. Quitting: putpkt: write failed: Broken pipe. So send a packet to exit GDB before we exit QEMU: [Inferior 1 (Thread 0) exited normally] Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Signed-off-by: KONRAD Frederic Message-id: 1521538773-30802-1-git-send-email-frederic.konrad@adacore.com Signed-off-by: Peter Maydell --- vl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vl.c') diff --git a/vl.c b/vl.c index 5fd01bd..fce1fd1 100644 --- a/vl.c +++ b/vl.c @@ -4733,6 +4733,8 @@ int main(int argc, char **argv, char **envp) main_loop(); + gdbserver_cleanup(); + /* No more vcpu or device emulation activity beyond this point */ vm_shutdown(); -- cgit v1.1