From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 323 invoked by alias); 28 Oct 2004 20:13:49 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32767 invoked from network); 28 Oct 2004 20:13:47 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 28 Oct 2004 20:13:47 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9SKDgDH013301 for ; Thu, 28 Oct 2004 16:13:42 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9SKDgr07800; Thu, 28 Oct 2004 16:13:42 -0400 Received: from touchme.toronto.redhat.com (IDENT:postfix@touchme.toronto.redhat.com [172.16.14.9]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id i9SKDgbU030393; Thu, 28 Oct 2004 16:13:42 -0400 Received: from redhat.com (toocool.toronto.redhat.com [172.16.14.72]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 927D180002E; Thu, 28 Oct 2004 16:13:41 -0400 (EDT) Message-ID: <418152F5.8090103@redhat.com> Date: Thu, 28 Oct 2004 20:13:00 -0000 From: Jeff Johnston User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 MIME-Version: 1.0 To: Daniel Jacobowitz Cc: Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: [RFA]: Watchpoints per thread patch References: <4175A9C9.8040300@redhat.com> <41769FF3.7010801@gnu.org> <20041020173035.GA26622@nevyn.them.org> <418022DE.204@redhat.com> <20041027224155.GA3485@nevyn.them.org> <41802C79.7040103@redhat.com> <20041028133333.GA32744@nevyn.them.org> <41814CCA.7080805@redhat.com> <20041028195208.GA5882@nevyn.them.org> In-Reply-To: <20041028195208.GA5882@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00474.txt.bz2 Daniel Jacobowitz wrote: > On Thu, Oct 28, 2004 at 03:47:22PM -0400, Jeff Johnston wrote: > >>Daniel Jacobowitz wrote: >> >>>On Wed, Oct 27, 2004 at 07:17:13PM -0400, Jeff Johnston wrote: >>> >>> >>>>Were you thinking of add_thread()? If so, we would have to move the >>>>calls to add_thread so they never occur before an attach because the >>>>low-level observers will need the thread already attached. >>> >>> >>>Oh, that's a good point. Do you think that's a reasonable change to >>>make? >>> >> >>It is a can of worms. I can move the add_thread call in attach_thread >>easily enough, but there are other calls to add_thread strewn about. For >>example, corelow.c calls add_thread as does infrun.c when it finds a new >>process. I certainly don't see it being valid for either of these >>scenarios to insert/remove all watchpoints. My personal preference would >>be to leave it where it is for now. > > > There are two separate questions here: > - When do we need to be adding and removing watchpoints from threads > on GNU/Linux? > - When should an observer named "new_thread" be called? > > If it's not valid to do the former action at all the latter points, > then it's not the right observer to be using. > It could easily be called new_linux_thread or new_lwp_thread. > The code in infrun is never reached for native GNU/Linux threads, btw; > I'm not sure which targets if any do reach it. I don't believe remote > GNU/Linux threads do either. > If you feel that add_thread will be safe in other scenarios, I am more than happy to do the change, but I will only be testing linux. -- Jeff J.