From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116141 invoked by alias); 10 Oct 2016 10:45:32 -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 116115 invoked by uid 89); 10 Oct 2016 10:45:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=U*tromey, sk:tromey, sk:tromey@, H*M:142 X-HELO: tarox.wildebeest.org Received: from herd.wildebeest.org (HELO tarox.wildebeest.org) (80.127.118.209) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Oct 2016 10:45:19 +0000 Received: by tarox.wildebeest.org (Postfix, from userid 1000) id E3E8D4108BF3; Mon, 10 Oct 2016 12:45:11 +0200 (CEST) Message-ID: <1476096311.21750.142.camel@redhat.com> Subject: Re: [patch+7.12.1 2/2] Fix TLS (such as 'errno') regression From: Mark Wielaard To: Jan Kratochvil Cc: gdb-patches@sourceware.org Date: Mon, 10 Oct 2016 10:45:00 -0000 In-Reply-To: <20161009185647.GB13645@host1.jankratochvil.net> References: <20161009185647.GB13645@host1.jankratochvil.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 X-SW-Source: 2016-10/txt/msg00215.txt.bz2 On Sun, 2016-10-09 at 20:56 +0200, Jan Kratochvil wrote: > 2273f0ac95a79ce29ef42025c63f90e82cf907d7 is the first bad commit > commit 2273f0ac95a79ce29ef42025c63f90e82cf907d7 > Author: Tom Tromey > Date: Tue Oct 15 13:28:57 2013 -0600 > change minsyms not to be relocated at read-time > [FYI v3 06/10] change minsyms not to be relocated at read-time > Message-Id: <1393441273-32268-7-git-send-email-tromey@redhat.com> > https://sourceware.org/ml/gdb-patches/2014-02/msg00798.html >=20 > mv /usr/lib/debug /usr/lib/debug-x > echo 'int main(){}'|gcc -pthread -x c - > ./gdb -q -ex start -ex 'set debug expr 1' -ex 'p errno' ./a.out=20 > 0 UNOP_MEMVAL_TLS TLS type @0x35df7e0 (__thread /* "/lib64/li= bc.so.6" */ ) > 4 OP_LONG Type @0x35df850 (__CORE_ADDR), value 1407= 37345728528 (0x7ffff77fb010) > Cannot access memory at address 0xffffef7c9698 > -> > 0 UNOP_MEMVAL_TLS TLS type @0x3ad9520 (__thread /* "/lib64/li= bc.so.6" */ ) > 4 OP_LONG Type @0x3ad9590 (__CORE_ADDR), value 16 (= 0x10) > $1 =3D 0 >=20 > With glibc debuginfo, that is without: mv /usr/lib/debug /usr/lib/debug-x > 0 OP_VAR_VALUE Block @0x3b30e70, symbol @0x3b30d10 (errno) > $1 =3D 0 > So such case is unrelated to this patch and the regression is not visible= with > glibc debuginfo installed. FYI. This issue, cause and fix look very similar to PR varobj/18564 "regression in showing __thread so extern variable". Might there be other places that need similar adjustments for getting at the values of tls variables?