diff options
author | David Spickett <david.spickett@linaro.org> | 2023-03-15 09:54:47 +0000 |
---|---|---|
committer | David Spickett <david.spickett@linaro.org> | 2023-03-15 09:54:47 +0000 |
commit | 71c4d186f1cf247f1aa45f4fd1b38f350b68d123 (patch) | |
tree | 1bf1d2470a92a56cca0cce5b1fbf98b588378fd7 /lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp | |
parent | af38530ee29c285f3827e33a41edf27c9c3a6767 (diff) | |
download | llvm-71c4d186f1cf247f1aa45f4fd1b38f350b68d123.zip llvm-71c4d186f1cf247f1aa45f4fd1b38f350b68d123.tar.gz llvm-71c4d186f1cf247f1aa45f4fd1b38f350b68d123.tar.bz2 |
Revert "[lldb] Refactor CrashReason"
This reverts commit af38530ee29c285f3827e33a41edf27c9c3a6767 due
to a build failure on 32 bit.
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp index b62e9f64..9b9dfe5 100644 --- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp @@ -294,19 +294,19 @@ void NativeThreadLinux::SetStoppedBySignal(uint32_t signo, case SIGBUS: case SIGFPE: case SIGILL: - m_stop_description = GetCrashReasonString(*info); -#ifndef SEGV_MTESERR -#define SEGV_MTESERR 9 -#endif - if (info->si_signo == SIGSEGV && info->si_code == SEGV_MTESERR) - AnnotateSyncTagCheckFault( - reinterpret_cast<lldb::addr_t>(info->si_addr)); + const auto reason = GetCrashReason(*info); + m_stop_description = GetCrashReasonString(reason, *info); + + if (reason == CrashReason::eSyncTagCheckFault) { + AnnotateSyncTagCheckFault(info); + } + break; } } } -void NativeThreadLinux::AnnotateSyncTagCheckFault(lldb::addr_t fault_addr) { +void NativeThreadLinux::AnnotateSyncTagCheckFault(const siginfo_t *info) { int32_t allocation_tag_type = 0; switch (GetProcess().GetArchitecture().GetMachine()) { // aarch64_32 deliberately not here because there's no 32 bit MTE @@ -331,6 +331,7 @@ void NativeThreadLinux::AnnotateSyncTagCheckFault(lldb::addr_t fault_addr) { m_stop_description.pop_back(); std::stringstream ss; + lldb::addr_t fault_addr = reinterpret_cast<uintptr_t>(info->si_addr); std::unique_ptr<MemoryTagManager> manager(std::move(details->manager)); ss << " logical tag: 0x" << std::hex << manager->GetLogicalTag(fault_addr); |