[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:20 PST 2025


================
@@ -254,7 +254,38 @@ bool ValueObjectVariable::UpdateValue() {
       m_resolved_value.SetContext(Value::ContextType::Invalid, nullptr);
     }
   }
-
+  if (m_error.Fail() && variable->IsThreadLocal()) {
+    ExecutionContext exe_ctx(GetExecutionContextRef());
+    Thread *thread = exe_ctx.GetThreadPtr();
+    lldb::ModuleSP module_sp = GetModule();
+    if (!thread) {
+      m_error = Status::FromErrorString("no thread to evaluate TLS within");
+      return m_error.Success();
+    }
+    std::vector<uint32_t> symbol_indexes;
+    module_sp->GetSymtab()->FindAllSymbolsWithNameAndType(
----------------
clayborg wrote:

Use `Module::FindFirstSymbolWithNameAndType`. No need to get every symbol for this if we just need the first one.

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


More information about the lldb-commits mailing list