From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NlOUe-0001Z3-QS for qemu-devel@nongnu.org; Sat, 27 Feb 2010 10:22:12 -0500 Received: from [199.232.76.173] (port=43588 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NlOUe-0001Yj-8H for qemu-devel@nongnu.org; Sat, 27 Feb 2010 10:22:12 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NlOUc-00064W-TR for qemu-devel@nongnu.org; Sat, 27 Feb 2010 10:22:12 -0500 Received: from hall.aurel32.net ([88.191.82.174]:53768) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NlOUc-00064S-Kq for qemu-devel@nongnu.org; Sat, 27 Feb 2010 10:22:10 -0500 Date: Sat, 27 Feb 2010 16:22:02 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] Re: Re: [PATCH] Fix to 'gdb detach' stub Message-ID: <20100227152202.GA10291@volta.aurel32.net> References: <4B88014E.5040806@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <4B88014E.5040806@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Daniel Gutson Cc: kwolf@redhat.com, qemu-devel@nongnu.org, daniel.gutson@gmail.com On Fri, Feb 26, 2010 at 02:13:50PM -0300, Daniel Gutson wrote: > Hello Kevin, > please let me know if this works. > If so, please remember that I'd need somebody to commit this for me, since I don't have write-access. > > Undoing line wrap and tabs. Thanks applied. > Thanks! > Daniel. > > [old same text.] > 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) > case 'D': > /* Detach packet */ > gdb_breakpoint_remove_all(); > + gdb_syscall_mode = GDB_SYS_DISABLED; > gdb_continue(s); > put_packet(s, "OK"); > break; > -- > 1.6.2.4 > > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net