[Lldb-commits] [lldb] [LLDB] Enable TLS Variable Debugging Without Location Info on AArch64 (PR #110822)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 27 17:33:21 PST 2025
================
@@ -438,6 +438,19 @@ Status Variable::GetValuesForVariableExpressionPath(
return error;
}
+bool Variable::IsThreadLocal() const {
+ ModuleSP module_sp(m_owner_scope->CalculateSymbolContextModule());
+ // Give the symbol vendor a chance to add to the unified section list.
+ module_sp->GetSymbolFile();
+ std::vector<uint32_t> symbol_indexes;
+ module_sp->GetSymtab()->FindAllSymbolsWithNameAndType(
+ ConstString(GetName()), lldb::SymbolType::eSymbolTypeAny, symbol_indexes);
+ if (symbol_indexes.empty())
+ return false;
+ Symbol *symbol = module_sp->GetSymtab()->SymbolAtIndex(symbol_indexes[0]);
+ return symbol->GetAddress().GetSection()->IsThreadSpecific();
+}
+
----------------
clayborg wrote:
This doesn't work for all architectures so this belongs in an OS ABI plug-in or something like that. We debug many different systems: linux, macOS, iOS, windows, Android etc, and the way variables are stored is an OS ABI thing.
https://github.com/llvm/llvm-project/pull/110822
More information about the lldb-commits
mailing list