[Lldb-commits] [lldb] [LLDB] Enable TLS Variable Debugging Without Location Info on AArch64 (PR #110822)

Kamlesh Kumar via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 3 07:30:41 PDT 2024


kamleshbhalui wrote:

> The implementation of Variable::IsThreadLocal is most likely a non-starter, as it introduces a relatively expensive operation on the common variable update path for all variables. Doing this (once) at variable creation would be better, but I still have very big reservations about this approach. AFAICT, there's no way to guarantee that the variable you find this way will be the one that is actually described by the DWARF. You could even have more than one variable with the same name if they're `static thread_local`.
> 
> This really sounds like something where the compiler should give us more to go on -- instead of us trying to divine this information out of thin air.

I could pass that info to variable creation to simplify the check on update path and about second question even gdb could not debug  static thread_local.

https://github.com/llvm/llvm-project/pull/110822


More information about the lldb-commits mailing list