From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16153 invoked by alias); 25 Feb 2009 07:18:50 -0000 Received: (qmail 16138 invoked by uid 22791); 25 Feb 2009 07:18:49 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from e23smtp03.au.ibm.com (HELO e23smtp03.au.ibm.com) (202.81.31.145) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Feb 2009 07:18:39 +0000 Received: from d23relay01.au.ibm.com (d23relay01.au.ibm.com [202.81.31.243]) by e23smtp03.au.ibm.com (8.13.1/8.13.1) with ESMTP id n1P7Gr9F001779 for ; Wed, 25 Feb 2009 18:16:53 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay01.au.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n1P7ImsC442754 for ; Wed, 25 Feb 2009 18:18:50 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n1P7IU64007036 for ; Wed, 25 Feb 2009 18:18:30 +1100 Received: from [9.124.31.88] (vinaysridhar.in.ibm.com [9.124.31.88]) by d23av03.au.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n1P7IRIH006976; Wed, 25 Feb 2009 18:18:27 +1100 Subject: Re: [RFC][Patch] Fix gdb failure to access tls data for parent thread From: Vinay Sridhar To: Pedro Alves Cc: gdb-patches@sourceware.org, Daniel Jacobowitz , luisgpm@linux.vnet.ibm.com In-Reply-To: <200902241716.09368.pedro@codesourcery.com> References: <20090211155300.GA22689@caradoc.them.org> <20090224153153.GA7032@caradoc.them.org> <200902241558.31703.pedro@codesourcery.com> <200902241716.09368.pedro@codesourcery.com> Content-Type: text/plain Date: Wed, 25 Feb 2009 18:28:00 -0000 Message-Id: <1235546174.13712.6.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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: 2009-02/txt/msg00480.txt.bz2 On Tue, 2009-02-24 at 17:16 +0000, Pedro Alves wrote: > On Tuesday 24 February 2009 15:58:31, Pedro Alves wrote: > > On Tuesday 24 February 2009 15:31:53, Daniel Jacobowitz wrote: > > > 81 /* Verify that this thread's pid field matches the child PID. > > > 82 If its pid field is negative, it's about to do a fork or it > > > 83 is the sole thread in a fork child. */ > > > > Boo, I'm on glibc 2.7, which doesn't have this check, but I see it > > in glibc-2.9 sources... > > > > > It's checking that the PID (not TID) matches proc_handle.pid. We need > > > to find another way to read from a stopped thread, since if we put any > > > other PID there, we get no threads. I would suggest expanding > > > ps_prochandle to include a memory thread as ptid_t. > > > > Right, I'll take this. > > Here it is, how does it look? This works on glibc-2.7, but then again, that > version isn't affected by this. Could one of you please give it a shot and > see if it fixes the reported issue? > Tested this with the Feb snapshot. The patch fixes the issue. I'm using glibc-2.9.. Thanks, Vinay