[all-commits] [llvm/llvm-project] 623922: [lldb][AArch64] Save/restore TLS registers around ...
David Spickett via All-commits
all-commits at lists.llvm.org
Thu Aug 3 05:34:06 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6239227172cdc92f3bb72131333f50f83a6439cf
https://github.com/llvm/llvm-project/commit/6239227172cdc92f3bb72131333f50f83a6439cf
Author: David Spickett <david.spickett at linaro.org>
Date: 2023-08-03 (Thu, 03 Aug 2023)
Changed paths:
M lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
M lldb/test/API/linux/aarch64/tls_registers/TestAArch64LinuxTLSRegisters.py
M lldb/test/API/linux/aarch64/tls_registers/main.c
Log Message:
-----------
[lldb][AArch64] Save/restore TLS registers around expressions
Previously lldb was storing them but not restoring them. Meaning that this function:
```
void expr(uint64_t value) {
__asm__ volatile("msr tpidr_el0, %0" ::"r"(value));
}
```
When run from lldb:
```
(lldb) expression expr()
```
Would leave tpidr as `value` instead of the original value of the register.
A check for this scenario has been added to TestAArch64LinuxTLSRegisters.py,
which covers tpidr and the SME excluisve tpidr2 register when it's present.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D156512
More information about the All-commits
mailing list