From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12456 invoked by alias); 11 Feb 2009 08:33:18 -0000 Received: (qmail 12447 invoked by uid 22791); 11 Feb 2009 08:33:17 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from e28smtp04.in.ibm.com (HELO e28smtp04.in.ibm.com) (59.145.155.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Feb 2009 08:33:10 +0000 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by e28smtp04.in.ibm.com (8.13.1/8.13.1) with ESMTP id n1B8X2fu009342 for ; Wed, 11 Feb 2009 14:03:02 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n1B8X8T8954614 for ; Wed, 11 Feb 2009 14:03:08 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.13.1/8.13.3) with ESMTP id n1B8X13o006580 for ; Wed, 11 Feb 2009 19:33:01 +1100 Received: from [9.124.31.74] ([9.124.31.74]) by d28av05.in.ibm.com (8.13.1/8.12.11) with ESMTP id n1B8X1rc006577; Wed, 11 Feb 2009 19:33:01 +1100 Subject: Re: [RFC][Patch] Fix gdb failure to access tls data for parent thread From: Vinay Sridhar To: Daniel Jacobowitz Cc: gdb-patches@sourceware.org, luisgpm@linux.vnet.ibm.com In-Reply-To: <20090204132851.GA9935@caradoc.them.org> References: <200901091416.10563.vinay@linux.vnet.ibm.com> <20090204132851.GA9935@caradoc.them.org> Content-Type: text/plain Date: Wed, 11 Feb 2009 08:33:00 -0000 Message-Id: <1234341068.13249.4.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/msg00233.txt.bz2 On Wed, 2009-02-04 at 08:28 -0500, Daniel Jacobowitz wrote: > On Fri, Jan 09, 2009 at 02:16:09PM +0530, Vinay Sridhar wrote: > > The reason for this is gdb does not fill in the private field of the > > thread_info structure of the parent thread. The below patch sets up > > this private field before the child threads are added to gdb's list. > > The private info is set in attach_thread. That is supposed to be > called for every thread; how did you get a thread on the thread list > that did not have this routine called? A breakpoint on add_thread > and add_thread_with_info will probably figure this out. > Daniel, Sorry for the late response. I can confirm that attach_thread is not called on the parent thread. The test case I had listed in my earlier mail uses OMP for thread creation. Could that have something to do with this? Thanks, Vinay