This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Printing thread_local a.k.a. __thread variables
- From: Dmitry Antipov <dantipov at nvidia dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: GDB Development <gdb at sourceware dot org>
- Date: Mon, 12 Feb 2018 17:15:42 +0300
- Subject: Re: Printing thread_local a.k.a. __thread variables
- Authentication-results: sourceware.org; auth=none
- References: <780169f5-fa63-3357-ed78-a3045991c307@nvidia.com> <CAH=s-PP8rg3YxP1uO-PiXa1WJhM4+ks8Z3=TwKJuCmqUBdxULg@mail.gmail.com>
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