[lldb-dev] Thead-local storage support
Jason Molenda
jason at molenda.com
Sun Jan 4 14:43:45 PST 2015
> On Jan 4, 2015, at 8:14 AM, 465 <nriley at sabi.net> wrote:
>
> In article <54A8D4C9.8010802 at llnl.gov>,
> Ignacio Laguna <lagunaperalt1 at llnl.gov> wrote:
>
>> Does the current version of lldb support thread local storage (TLS)
>> variables via the __thread syntax in OS X? When I print such variables
>> lldb prints a void pointer (to the TLS sections I believe), but it
>> doesn't print the value of the variable like in gdb.
>
> It appears the answer is no, given the associated test is expected to
> fail.
>
> <https://github.com/llvm-mirror/lldb/commit/2667461a03f7ea34da0736f0b81f36a43060bd1e>
Yeah, we need to implement DynamicLoaderMacOSXDYLD::GetThreadLocalData() for this to work - that's what the radar # listed in that expected-fail is tracking. It also looks like there's a bug in the current dsymutil where tls variables are not copied into the .dSYM bundle, I filed a quick bug report on that. You can do .o file debugging (where the debugger reads the dwarf out of the individual .o files) to work around that - but without a Darwin implementation of GetThreadLocalData(), it's not going to get much further.
J
More information about the lldb-dev
mailing list