qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] gdbstub: Close connection in gdb_exit
@ 2011-01-13 11:46 Fabien Chouteau
  2011-01-13 13:07 ` Edgar E. Iglesias
  2011-01-16 20:04 ` Edgar E. Iglesias
  0 siblings, 2 replies; 3+ messages in thread
From: Fabien Chouteau @ 2011-01-13 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Fabien Chouteau

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 <chouteau@adacore.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-16 20:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 11:46 [Qemu-devel] [PATCH v2] gdbstub: Close connection in gdb_exit Fabien Chouteau
2011-01-13 13:07 ` Edgar E. Iglesias
2011-01-16 20:04 ` Edgar E. Iglesias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).