From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Njs3V-0004z6-2H for qemu-devel@nongnu.org; Tue, 23 Feb 2010 05:31:53 -0500 Received: from [199.232.76.173] (port=46605 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Njs3U-0004yW-1c for qemu-devel@nongnu.org; Tue, 23 Feb 2010 05:31:52 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Njs3T-0001iP-BM for qemu-devel@nongnu.org; Tue, 23 Feb 2010 05:31:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33322) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Njs3T-0001iJ-0A for qemu-devel@nongnu.org; Tue, 23 Feb 2010 05:31:51 -0500 Message-ID: <4B83AE5D.8050006@redhat.com> Date: Tue, 23 Feb 2010 11:30:53 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] Fix to 'gdb detach' stub References: <4B82EE07.80904@codesourcery.com> <4B82F59D.8050204@codesourcery.com> In-Reply-To: <4B82F59D.8050204@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Daniel Gutson Cc: qemu-devel@nongnu.org Am 22.02.2010 22:22, schrieb Daniel Gutson: > [Re-done with git.] > With this patch, 'gdb detach' correctly resumes the inferior execution > after detaching the debugger. > The bug was caused by qemu asking gdb to execute a syscall (isatty) > after the detach, and then waiting (forever) for the reply. I fixed this > by properly setting gdb_syscall_mode appropriately in the 'detach' > packet handling, so subsequent syscalls are solved by qemu rather than gdb. > > Signed-off-by: Daniel Gutson > --- > gdbstub.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/gdbstub.c b/gdbstub.c > index 91c5f68..92bb36d 100644 > --- a/gdbstub.c > +++ b/gdbstub.c > @@ -1848,6 +1848,7 @@ static int gdb_handle_packet(GDBState *s, const > char *line_buf) This line wrap corrupts the patch. Have you tried git send-email? > case 'D': > /* Detach packet */ > gdb_breakpoint_remove_all(); > + gdb_syscall_mode = GDB_SYS_DISABLED; And indentation is off here (qemu uses four spaces, no tabs). Kevin