From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30495 invoked by alias); 10 May 2007 18:57:10 -0000 Received: (qmail 30486 invoked by uid 22791); 10 May 2007 18:57:09 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 10 May 2007 18:57:06 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 47DAB4B267; Thu, 10 May 2007 13:57:05 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id 2A1024B262; Thu, 10 May 2007 13:57:05 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1HmDp2-0007J7-Pp; Thu, 10 May 2007 14:57:04 -0400 Date: Thu, 10 May 2007 18:57:00 -0000 From: Daniel Jacobowitz To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFC] [gdbserver/win32] Enable detaching on MinGW. Message-ID: <20070510185704.GC27802@caradoc.them.org> Mail-Followup-To: Pedro Alves , gdb-patches@sourceware.org References: <463FDC1C.8020302@portugalmail.pt> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <463FDC1C.8020302@portugalmail.pt> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00162.txt.bz2 On Tue, May 08, 2007 at 03:10:36AM +0100, Pedro Alves wrote: > Hi all, > > Currently detach support is skipped on MinGW (and mingw32ce), > because there is no waitpid on Windows. This patch enables it > by implementing the waiting for the inferior to exit in a new > target_op::join. > > One thing that annoys me, is that requesting for detach kills the > inferior if detaching isn't supported. The patch makes gdbserver > return an error (E packet) to gdb, so gdb knows it shouldn't > stop debugging. The user can then kill the inferior is he wants. > > What do you think of this behavior? > > Is the patch OK? The gdbserver parts are fine. > - remote_send (&rs->buf, &rs->buf_size); > + putpkt (rs->buf); > + getpkt (&rs->buf, &rs->buf_size, 0); > + > + if (rs->buf[0] == 'E') > + error (_("Can't detach process.")); Isn't this basically what happens already in remote_send? Oh, but we have a better error message now. This part's OK too. -- Daniel Jacobowitz CodeSourcery