echo 'main(){}'|gcc -g -x c -;./gdb -nx -ex start -ex 'p errno' ./a.out Cannot find thread-local variables on this target It happens for any variable marked by __thread when -lpthread is not used. Fedora GDB has some hacks such as using `*__errno_location()' instead of `errno'. The proper way would be glibc extension to support __thread variables even without -lpthread mode as they are used not just for `errno'. Draft patches included.
Created attachment 4873 [details] glibc draft patch by Roland McGrath.
Created attachment 4874 [details] GDB draft patch.
*** Bug 13582 has been marked as a duplicate of this bug. ***
*** Bug 14345 has been marked as a duplicate of this bug. ***
By Roland McGrath f2f, IIUC: GDB can already iterate TIDs based on readdir(/proc/PID/task/). Just TID->pthread_t translation and TLS variables access has currently no equaivalent without libthread_db. Therefore drop libthread_db, Roland proposes / will accept Python based equivalent. Even drop libthread_db from gdbserver, Python can run at GDB (not at gdbserver) as libthread_db-like-Python-implementation has no arch dependency like libthread_db.so has, it can run from client GDB with small gdbserver protocol extension packet for PTRACE_GET_THREAD_AREA and maybe some others.
*** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla.