[RFA] PR python/20190 - compute TLS symbol without a frame

Tom Tromey tom@tromey.com
Tue Jun 28 21:15:00 GMT 2016


>>>>> "Yao" == Yao Qi <qiyaoltc@gmail.com> writes:

Yao> I don't understand why your original attempt fixing PR11803
Yao> (https://sourceware.org/ml/gdb-patches/2010-07/msg00374.html)
Yao> doesn't work here.

The difference is in what happens when you try to refer to a __thread
variable without an inferior.  I think this was pointed out in one of
the follow-ups.

With the original patch, the failure mode looks like:

    (gdb) print a_thread_local 
    Cannot find thread-local storage for process 0, executable file /home/tromey/gdb/build/gdb/testsuite/outputs/gdb.threads/tls/tls:
    Cannot find thread-local variables on this target

With the current patch the result is nicer:

    (gdb) print a_thread_local 
    Cannnot read `a_thread_local' without registers

Tom



More information about the Gdb-patches mailing list