Hi, testcase results may depend on patch: [patch] Fix gdbserver qGetTLSAddr for x86_64 -m32 https://sourceware.org/ml/gdb-patches/2014-04/msg00154.html Message-ID: <20140410114901.GA16411@host2.jankratochvil.net> There is: * gdb.threads/staticthreads.exp to test -static -pthread 'info threads' * gdb.threads/tls.exp to test TLS access (__thread variables) but no testcase to test both together - it even does not work. I have posted: TLS variables access for -static -lpthread executables https://sourceware.org/ml/libc-help/2014-03/msg00024.html and the GDB patch below has been confirmed as OK for current glibcs. Future glibcs may implement more native support for -static -pthread TLS https://sourceware.org/bugzilla/show_bug.cgi?id=16828 which will require also some new GDB support. Still the patch below implements the feature in a fully functional way backward compatible with current glibcs, it depends on the following glibc source line: csu/libc-tls.c main_map->l_tls_modid = 1; No regressions on {x86_64,x86_64-m32}-fedorarawhide-linux-gnu. Thanks, Jan