================
@@ -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)
----------------
DavidSpickett wrote:
The usual complaint here about architecture specific code being in generic
paths. This at least needs a comment to explain why we're not doing this for
AArch64. If not a better place to put it. ABI plugins is the usual place, this
is part of the ABI after all.
Have a look at `lldb/source/Plugins/ABI/AArch64/ABIAArch64.h` and the others in
that folder.
I also wonder if this will break horribly if we ever do emit proper information
from the compiler. Does this code run before or after the code above in
ValueObjectVariable.cpp? I wonder if we can from know already that we've been
given the right information, and know whether to apply this workaround.
https://github.com/llvm/llvm-project/pull/110822
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits