[Lldb-commits] [PATCH] D152516: [lldb][AArch64] Add thread local storage tpidr register
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 9 04:13:10 PDT 2023
DavidSpickett created this revision.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
DavidSpickett requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
This register is used as the pointer to the current thread
local storage block and is read from NT_ARM_TLS on Linux.
Though tpidr will be present on all AArch64 Linux, I am soon
going to add a second register tpidr2 to this set.
tpidr is only present when SME is implemented, therefore the
NT_ARM_TLS set will change size. This is why I've added this
as a dynamic register set to save changes later.
As we can't predict exactly where the TLS data will be,
the tests modify the pointer and observe changes in the program's
behaviour based on that.
So if we read the wrong value in the first place, our modifications
wouldn't work as expected.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152516
Files:
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
lldb/test/API/linux/aarch64/tls_register/Makefile
lldb/test/API/linux/aarch64/tls_register/TestAArch64LinuxTLSRegister.py
lldb/test/API/linux/aarch64/tls_register/main.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152516.529901.patch
Type: text/x-patch
Size: 14298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230609/6b9e4fe7/attachment-0001.bin>
More information about the lldb-commits
mailing list