qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Fabien Chouteau <chouteau@adacore.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] gdbstub: Close connection in gdb_exit
Date: Thu, 13 Jan 2011 14:07:51 +0100	[thread overview]
Message-ID: <20110113130751.GD7296@edde.se.axis.com> (raw)
In-Reply-To: <92a1896f5af064a8ed5477c52c2556f2bb0f6948.1294918897.git.chouteau@adacore.com>

On Thu, Jan 13, 2011 at 12:46:57PM +0100, 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.
> 
> Version 2:
>    Fix linux-user build error.

Hi, It seems a bit odd to explicitely close for system mode but
to implicitely close (at exit) for user mode. But if no one
complains, I'm OK with this version.

Cheers

> 
> 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
> 
> 

  reply	other threads:[~2011-01-13 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-01-16 20:04 ` Edgar E. Iglesias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110113130751.GD7296@edde.se.axis.com \
    --to=edgar.iglesias@gmail.com \
    --cc=chouteau@adacore.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).