From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27414 invoked by alias); 24 Feb 2009 10:57:43 -0000 Received: (qmail 27406 invoked by uid 22791); 24 Feb 2009 10:57:42 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43 X-Spam-Check-By: sourceware.org Received: from e28smtp02.in.ibm.com (HELO e28smtp02.in.ibm.com) (59.145.155.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Feb 2009 10:57:36 +0000 Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by e28smtp02.in.ibm.com (8.13.1/8.13.1) with ESMTP id n1OAvU3p019521 for ; Tue, 24 Feb 2009 16:27:30 +0530 Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n1OAsg5G3649684 for ; Tue, 24 Feb 2009 16:24:42 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.13.1/8.13.3) with ESMTP id n1OAvUVZ010290 for ; Tue, 24 Feb 2009 21:57:30 +1100 Received: from [9.124.124.72] (vinaysridhar.in.ibm.com [9.124.124.72]) by d28av04.in.ibm.com (8.13.1/8.12.11) with ESMTP id n1OAvUkY010287; Tue, 24 Feb 2009 21:57:30 +1100 Subject: Re: [RFC][Patch] Fix gdb failure to access tls data for parent thread From: Vinay Sridhar To: Pedro Alves Cc: Daniel Jacobowitz , gdb-patches@sourceware.org, luisgpm@linux.vnet.ibm.com In-Reply-To: <1235472610.4894.14.camel@localhost.localdomain> References: <20090211155300.GA22689@caradoc.them.org> <1235379059.10038.12.camel@localhost.localdomain> <20090223140812.GA10946@caradoc.them.org> <200902232009.58960.pedro@codesourcery.com> <1235472610.4894.14.camel@localhost.localdomain> Content-Type: text/plain; charset=UTF-8 Date: Tue, 24 Feb 2009 13:39:00 -0000 Message-Id: <1235472922.4894.17.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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/msg00457.txt.bz2 > Pedro, > > Please try this test and let me know if you're able to get a recreate: > > $ cat test.c > > #include > #include > #include > #include > > __thread int thr; > > void initTlsData() { > printf("Initialising thread %d\n",thr); > } > > int main(int argc, char *argv[]) { > #pragma omp parallel > { > thr = omp_get_thread_num(); > initTlsData(); > } > return(0); > } > > 0. export OMP_NUM_THREADS = > 1. gcc -g test.c -fopenmp -o test > 2. gdb ./test > 3. break initTlsData ========================== 4. run (extremely sorry for missing this in the previous mail) ========================== > 4. thread 1 (Switch to main thread) > 5. print thr (You should see the error after this) >