qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Close Gdb stub connection in gdb_exit
@ 2011-01-04 10:27 Fabien Chouteau
  2011-01-13  9:24 ` Fabien Chouteau
  0 siblings, 1 reply; 4+ messages in thread
From: Fabien Chouteau @ 2011-01-04 10:27 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.

Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
---
 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
-- 
1.7.1

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

* Re: [Qemu-devel] [PATCH] Close Gdb stub connection in gdb_exit
  2011-01-04 10:27 [Qemu-devel] [PATCH] Close Gdb stub connection in gdb_exit Fabien Chouteau
@ 2011-01-13  9:24 ` Fabien Chouteau
  2011-01-13 11:01   ` Edgar E. Iglesias
  0 siblings, 1 reply; 4+ messages in thread
From: Fabien Chouteau @ 2011-01-13  9:24 UTC (permalink / raw)
  To: qemu-devel

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

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

* Re: [Qemu-devel] [PATCH] Close Gdb stub connection in gdb_exit
  2011-01-13  9:24 ` Fabien Chouteau
@ 2011-01-13 11:01   ` Edgar E. Iglesias
  2011-01-13 11:44     ` Fabien Chouteau
  0 siblings, 1 reply; 4+ messages in thread
From: Edgar E. Iglesias @ 2011-01-13 11:01 UTC (permalink / raw)
  To: Fabien Chouteau; +Cc: qemu-devel

On Thu, Jan 13, 2011 at 10:24:50AM +0100, Fabien Chouteau wrote:
> 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<chouteau@adacore.com>
> > ---
> >   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?

Yes, sorry for the delays. This patch breaks the linux-user build.

Cheers

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

* Re: [Qemu-devel] [PATCH] Close Gdb stub connection in gdb_exit
  2011-01-13 11:01   ` Edgar E. Iglesias
@ 2011-01-13 11:44     ` Fabien Chouteau
  0 siblings, 0 replies; 4+ messages in thread
From: Fabien Chouteau @ 2011-01-13 11:44 UTC (permalink / raw)
  To: Edgar E. Iglesias; +Cc: qemu-devel

On 01/13/2011 12:01 PM, Edgar E. Iglesias wrote:
> On Thu, Jan 13, 2011 at 10:24:50AM +0100, Fabien Chouteau wrote:
>> 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<chouteau@adacore.com>
>>> ---
>>>    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?
>
> Yes, sorry for the delays. This patch breaks the linux-user build.

thanks,
I'll send new version in a minute.

-- 
Fabien Chouteau

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

end of thread, other threads:[~2011-01-13 11:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04 10:27 [Qemu-devel] [PATCH] Close Gdb stub connection in gdb_exit Fabien Chouteau
2011-01-13  9:24 ` Fabien Chouteau
2011-01-13 11:01   ` Edgar E. Iglesias
2011-01-13 11:44     ` Fabien Chouteau

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