[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


================
@@ -790,9 +793,12 @@ DynamicLoaderPOSIXDYLD::GetThreadLocalData(const lldb::ModuleSP module_sp,
     LLDB_LOGF(log, "GetThreadLocalData error: fail to read modid");
     return LLDB_INVALID_ADDRESS;
   }
-
+  const llvm::Triple &triple_ref =
+      m_process->GetTarget().GetArchitecture().GetTriple();
   // Lookup the DTV structure for this thread.
-  addr_t dtv_ptr = tp + metadata.dtv_offset;
+  addr_t dtv_ptr = tp;
+  if (triple_ref.getArch() != llvm::Triple::aarch64)
----------------
clayborg wrote:

I second this motion and it matches my comments above. We can't just have arch specific code in a code path that is only used for a specific architecture. 

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


More information about the lldb-commits mailing list