[Top][All Lists]

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] gdbstub: avoid busy loop while w

From: Peter Maydell
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] gdbstub: avoid busy loop while waiting for gdb
Date: Thu, 5 May 2016 16:37:40 +0100

On 3 May 2016 at 23:58, Peter Wu <address@hidden> wrote:
> While waiting for a gdb response, or while sending an acknowledgement
> there is not much to do, so just mark the socket as non-blocking to
> avoid a busy loop while paused at gdb. This only affects the user-mode
> emulation (qemu-arm -g 1234 ./a.out).
> Note that this issue was reported before at
> https://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg02277.html.
> While at it, close the gdb client fd on EOF or error while reading.

The commit message says "mark the socket as non-blocking"...

> @@ -1599,8 +1603,6 @@ static void gdb_accept(void)
>      gdb_has_xml = false;
>      gdbserver_state = s;
> -
> -    fcntl(fd, F_SETFL, O_NONBLOCK);
>  }

...but the code change is *removing* a call to mark the
socket as non-blocking. Which is correct?

-- PMM

reply via email to

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