From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7460 invoked by alias); 5 Jun 2014 08:06:51 -0000 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 Received: (qmail 7448 invoked by uid 89); 5 Jun 2014 08:06:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Jun 2014 08:06:50 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5586ii1021951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 5 Jun 2014 04:06:44 -0400 Received: from host2.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5586e68016307 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 5 Jun 2014 04:06:43 -0400 Date: Thu, 05 Jun 2014 08:06:00 -0000 From: Jan Kratochvil To: Yao Qi Cc: gdb-patches@sourceware.org, Sergio Durigan Junior Subject: Re: [patch] Fix TLS access for -static -pthread Message-ID: <20140605080639.GA32146@host2.jankratochvil.net> References: <20140410115204.GB16411@host2.jankratochvil.net> <539018F9.5060307@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <539018F9.5060307@codesourcery.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00235.txt.bz2 On Thu, 05 Jun 2014 09:15:05 +0200, Yao Qi wrote: [...] > thread 1^M > [Switching to thread 1 (Thread 5784)]^M > #0 clone () at ../ports/sysdeps/unix/sysv/linux/arm/nptl/../clone.S:62^M > 62 cmp r0, #0^M > (gdb) PASS: gdb.threads/staticthreads.exp: thread 1 > up 10^M > #2 0xbe8ea7e4 in ?? ()^M > (gdb) FAIL: gdb.threads/staticthreads.exp: up 10 This is a bug of unwinding clone() at this PC. IIRC even x86_64 has this or similar CFI bug, though. > This patch is to set another breakpoint at the end of main, so that > main thread will hit it, and we can check the value of tlsvar then. > It is safe and we don't have to worry about whether gdb is able to > unwind from pthread library to main function or not. I have to warn that it may be a bit weaker test, it never tests both threads TLS access during the same stop, it tests only the current thread. But it still tests the patch works so I am fine with it (not an approval). > Is it good to you? b.t.w, this case is UNSUPPORTED on FC 20, because > staticthreads.c can't be compiled. I guess this case requires > some recent version of glibc. I do not see any unsupported case on * Fedora 20 x86_64 updates-testing disabled with debuginfos * Fedora 20 x86_64 updates-testing enabled with debuginfos * Fedora 20 x86_64 updates-testing enabled without debuginfos * Fedora Rawhide x86_64 with debuginfos for both nat and gdbserver runs. Sergio said he saw some problem with mktemp symbol on some Fedora but I do not have that reproducible so I cannot fix it. Thanks, Jan