From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9371 invoked by alias); 19 Mar 2004 21:32:37 -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 9364 invoked from network); 19 Mar 2004 21:32:36 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 19 Mar 2004 21:32:36 -0000 Received: from redhat.com (toocool.toronto.redhat.com [172.16.14.72]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 0C35F8000DA; Fri, 19 Mar 2004 16:32:36 -0500 (EST) Message-ID: <405B66F4.4090101@redhat.com> Date: Fri, 19 Mar 2004 21:32: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: gdb-patches@sources.redhat.com Subject: Re: [RFC]: fix for recycled thread ids References: <405A4089.1080605@redhat.com> <20040319015351.GA28443@nevyn.them.org> <405B3F83.4030503@redhat.com> <20040319190126.GA16950@nevyn.them.org> <405B4B8C.2060801@redhat.com> <20040319194011.GA18776@nevyn.them.org> In-Reply-To: <20040319194011.GA18776@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00473.txt.bz2 Daniel Jacobowitz wrote: > On Fri, Mar 19, 2004 at 02:35:40PM -0500, Jeff Johnston wrote: > >>>Conceptually, we attach to LWPs, not to threads. That suggests to me >>>that the correct fix is to ask the LWP layer if the LWP is attached >>>rather than looking it up in the thread list in the first place. >>>We've already got an appropriate list of LWPs though we might need a >>>new accessor. >>> >> >>I like that idea. We still have to deal with the bogus thread list entry. >>The routine prune_threads calls thread_db_alive and it won't realize the >>thread info it has is bogus because it will find the tid is valid. > > > Do you think this will be a problem? My hope is that it will just look > as if the thread has 'migrated' to a new LWP. > It will have invalid state associated with it. For example, the thread info has a prev_pc field. As to all the havoc that the state may or may not cause, I think it would be a very good idea to clean it up now. Who's to say what state will be added to thread_info in the future. -- Jeff J.