From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxj4r-0002wB-QZ for qemu-devel@nongnu.org; Wed, 15 Feb 2012 12:55:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rxj4n-0003M7-Dn for qemu-devel@nongnu.org; Wed, 15 Feb 2012 12:55:37 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:43246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxj4n-0003Lt-9N for qemu-devel@nongnu.org; Wed, 15 Feb 2012 12:55:33 -0500 Message-ID: <4F3BF191.8000804@codesourcery.com> Date: Wed, 15 Feb 2012 11:55:29 -0600 From: Meador Inge MIME-Version: 1.0 References: <1329324914-12296-1-git-send-email-meadori@codesourcery.com> <1329324914-12296-2-git-send-email-meadori@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 1/1] gdbserver: Keep VM state status replies from happening during a syscall List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On 02/15/2012 11:54 AM, Blue Swirl wrote: > On Wed, Feb 15, 2012 at 16:55, Meador Inge wrote: >> Fix an issue where the GDB server implementation was allowing 'RUN_STATE_DEBUG' >> transitions to send a signal trap status back to the GDB client while a syscall >> is being processed. This eventually resulted in sending a SIGINT to the GDB >> client. >> >> Signed-off-by: Meador Inge >> --- >> gdbstub.c | 3 ++- >> 1 files changed, 2 insertions(+), 1 deletions(-) >> >> diff --git a/gdbstub.c b/gdbstub.c >> index 7d470b6..34d2717 100644 >> --- a/gdbstub.c >> +++ b/gdbstub.c >> @@ -2480,7 +2480,6 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...) >> #ifndef CONFIG_USER_ONLY >> vm_stop(RUN_STATE_DEBUG); >> #endif >> - s->state = RS_IDLE; >> va_start(va, fmt); >> p = buf; >> *(p++) = 'F'; >> @@ -2557,6 +2556,8 @@ static void gdb_read_byte(GDBState *s, int ch) >> #endif >> { >> switch(s->state) { >> + case RS_SYSCALL: >> + s->state = RS_IDLE; > > Missing break statement or a comment about fallthrough. The fallthrough is intentional. I will add a comment. -- Meador Inge CodeSourcery / Mentor Embedded http://www.mentor.com/embedded-software