qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2] gdbstub: Close connection in gdb_exit


From: Fabien Chouteau
Subject: [Qemu-devel] [PATCH v2] gdbstub: Close connection in gdb_exit
Date: Thu, 13 Jan 2011 12:46:57 +0100

On Windows, this is required to flush the remaining data in the IO stream,
otherwise Gdb do not receive the last packet.

Version 2:
   Fix linux-user build error.

Signed-off-by: Fabien Chouteau <address@hidden>
---
 gdbstub.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/gdbstub.c b/gdbstub.c
index 0aa081b..d6556c9 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2391,6 +2391,12 @@ void gdb_exit(CPUState *env, int code)
 
   snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code);
   put_packet(s, buf);
+
+#ifndef CONFIG_USER_ONLY
+  if (s->chr) {
+      qemu_chr_close(s->chr);
+  }
+#endif
 }
 
 #ifdef CONFIG_USER_ONLY
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]