llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: Felipe de Azevedo Piovezan (felipepiovezan) <details> <summary>Changes</summary> LLDB currently fails to find TLS variables on Linux, and this is part of the problem. --- Full diff: https://github.com/llvm/llvm-project/pull/208643.diff 2 Files Affected: - (modified) lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp (+1) - (modified) lldb/unittests/ABI/AArch64/ABIAArch64Test.cpp (+16) ``````````diff diff --git a/lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp b/lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp index 72d03e2348e59..8226bb6aea424 100644 --- a/lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp +++ b/lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp @@ -88,6 +88,7 @@ uint32_t ABIAArch64::GetGenericNum(llvm::StringRef name) { .Cases({"sp", "x31"}, LLDB_REGNUM_GENERIC_SP) .Cases({"fp", "x29"}, LLDB_REGNUM_GENERIC_FP) .Case("cpsr", LLDB_REGNUM_GENERIC_FLAGS) + .Case("tpidr", LLDB_REGNUM_GENERIC_TP) .Case("x0", LLDB_REGNUM_GENERIC_ARG1) .Case("x1", LLDB_REGNUM_GENERIC_ARG2) .Case("x2", LLDB_REGNUM_GENERIC_ARG3) diff --git a/lldb/unittests/ABI/AArch64/ABIAArch64Test.cpp b/lldb/unittests/ABI/AArch64/ABIAArch64Test.cpp index 5f9332e3e85bd..b8a9886dbb7c4 100644 --- a/lldb/unittests/ABI/AArch64/ABIAArch64Test.cpp +++ b/lldb/unittests/ABI/AArch64/ABIAArch64Test.cpp @@ -66,6 +66,22 @@ TEST_P(ABIAArch64TestFixture, AugmentRegisterInfo) { EXPECT_EQ(new_pc.regnum_dwarf, arm64_dwarf::pc); } +TEST_P(ABIAArch64TestFixture, AugmentRegisterInfoThreadPointer) { + ABISP abi_sp = ABI::FindPlugin(ProcessSP(), ArchSpec(GetParam())); + ASSERT_TRUE(abi_sp); + using Register = DynamicRegisterInfo::Register; + + Register tpidr; + tpidr.name = ConstString("tpidr"); + tpidr.set_name = ConstString("GPR"); + std::vector<Register> regs{tpidr}; + + abi_sp->AugmentRegisterInfo(regs); + + ASSERT_EQ(regs.size(), 1U); + EXPECT_EQ(regs[0].regnum_generic, LLDB_REGNUM_GENERIC_TP); +} + INSTANTIATE_TEST_SUITE_P(ABIAArch64Tests, ABIAArch64TestFixture, testing::Values("aarch64-pc-linux", "arm64-apple-macosx")); `````````` </details> https://github.com/llvm/llvm-project/pull/208643 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
