From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104751 invoked by alias); 12 Feb 2018 14:15:53 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 104739 invoked by uid 89); 12 Feb 2018 14:15:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: hqemgate15.nvidia.com Received: from hqemgate15.nvidia.com (HELO hqemgate15.nvidia.com) (216.228.121.64) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Feb 2018 14:15:51 +0000 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com id ; Mon, 12 Feb 2018 06:15:54 -0800 Received: from HQMAIL104.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Mon, 12 Feb 2018 06:16:31 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Mon, 12 Feb 2018 06:16:31 -0800 Received: from UKMAIL102.nvidia.com (10.26.138.15) by HQMAIL104.nvidia.com (172.18.146.11) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 12 Feb 2018 14:15:48 +0000 Received: from localhost.localdomain (10.21.45.12) by UKMAIL102.nvidia.com (10.26.138.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 12 Feb 2018 14:15:44 +0000 Subject: Re: Printing thread_local a.k.a. __thread variables To: Yao Qi CC: GDB Development References: <780169f5-fa63-3357-ed78-a3045991c307@nvidia.com> From: Dmitry Antipov Message-ID: Date: Mon, 12 Feb 2018 14:15:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL102.nvidia.com (10.26.138.15) X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00084.txt.bz2 On 02/12/2018 05:02 PM, Yao Qi wrote: > Because you are in thread 1, main thread, in which tlocal is not changed. > If you switch to other threads, you'll see the right value of tlocal. Argh. But this seems doesn't work for extended-remote target: (gdb) thread apply all print tlocal Thread 9 (Thread 10463.10471): Cannot find thread-local storage for Thread 10463.10471, executable file target:/tmp/t-thread: Remote target failed to process qGetTLSAddr request (gdbserver side with '--remote-debug' agrees with the above): getpkt ("qGetTLSAddr:p28df.28e7,0,7f963e8a7330"); [no ack sent] putpkt ("$E01#a6"); [noack mode] Is my gdbserver is mis(configured|compiled) and do something wrong with libthread_db? Dmitry