From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33016 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdJQh-0004lq-Rc for qemu-devel@nongnu.org; Thu, 13 Jan 2011 04:25:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdJQg-0002Lb-Fw for qemu-devel@nongnu.org; Thu, 13 Jan 2011 04:25:15 -0500 Received: from mel.act-europe.fr ([194.98.77.210]:38666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdJQg-0002GB-9R for qemu-devel@nongnu.org; Thu, 13 Jan 2011 04:25:14 -0500 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 27502CB01D8 for ; Thu, 13 Jan 2011 10:24:57 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uNuoPsmkYkBA for ; Thu, 13 Jan 2011 10:24:57 +0100 (CET) Received: from [10.10.1.88] (pompomgalli.act-europe.fr [10.10.1.88]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 14811CB01BA for ; Thu, 13 Jan 2011 10:24:56 +0100 (CET) Message-ID: <4D2EC4E2.4080000@adacore.com> Date: Thu, 13 Jan 2011 10:24:50 +0100 From: Fabien Chouteau MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Close Gdb stub connection in gdb_exit References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 01/04/2011 11:27 AM, Fabien Chouteau wrote: > On Windows, this is required to flush the remaining data in the IO stream, > otherwise Gdb do not receive the last packet. > > Signed-off-by: Fabien Chouteau > --- > gdbstub.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/gdbstub.c b/gdbstub.c > index 0aa081b..dac3ce6 100644 > --- a/gdbstub.c > +++ b/gdbstub.c > @@ -2391,6 +2391,10 @@ void gdb_exit(CPUState *env, int code) > > snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code); > put_packet(s, buf); > + > + if (s->chr) { > + qemu_chr_close(s->chr); > + } > } > > #ifdef CONFIG_USER_ONLY Any comment on this patch? -- Fabien Chouteau