From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19069 invoked by alias); 3 Jul 2008 17:13:55 -0000 Received: (qmail 19061 invoked by uid 22791); 3 Jul 2008 17:13:55 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 03 Jul 2008 17:13:37 +0000 Received: (qmail 24971 invoked from network); 3 Jul 2008 17:13:36 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 Jul 2008 17:13:36 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: Get rid of ATTACH_NO_WAIT Date: Thu, 03 Jul 2008 17:13:00 -0000 User-Agent: KMail/1.9.9 Cc: Joel Brobecker References: <200806280018.59156.pedro@codesourcery.com> <200806280025.40155.pedro@codesourcery.com> <20080703164744.GA19465@adacore.com> In-Reply-To: <20080703164744.GA19465@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807031813.39394.pedro@codesourcery.com> 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: 2008-07/txt/msg00039.txt.bz2 Hi Joel, A Thursday 03 July 2008 17:47:44, Joel Brobecker wrote: > Hi Pedro, > > > 2008-06-28 Pedro Alves > > > > * config/i386/nm-cygwin.h (ATTACH_NO_WAIT): Delete. > > * config/i386/nm-i386gnu.h (ATTACH_NO_WAIT): Delete. > > > > * target.h (struct target_ops): Add to_attach_no_wait member. > > (target_attach_no_wait): New. > > * target.c (update_current_target): Inherit to_attach_no_wait. > > > > * infcmd.c: Replace ATTACH_NO_WAIT compile time check by > > target_attach_no_wait runtime check. > > > > * gnu-nat.c (init_gnu_ops): Set to_attach_no_wait in gnu_ops. > > * win32-nat.c (init_win32_ops): Set to_attach_no_wait in > > win32_ops. > > I will be glad to see this macro go, and overall the patch looks good > to me. > > One thing I had to think about a little was whether this property > should be inherited or not (see target.c:update_current_target()). > I'm still not sure, but I think it should. I think it should. Normally, I expect the debug API to attach to a process to be implemented by the process_stratum target, even if the thread_stratum is pushed already for whatever reason, and needs to do poke the just attached process. > Imagine that we had > a thread stratum on win32. Wouldn't you lose the attach_no_wait property > when this thread stratum got pushed on the target? Until we find a > target where the process and thread strata need a different setting, > I think it's safer for now to make it inheritable. What do you think? Hmm, I'm already doing it? Or did I miss anything? -- Pedro Alves