diff options
author | Stephane Sezer <sas@cd80.net> | 2015-09-14 16:51:58 +0000 |
---|---|---|
committer | Stephane Sezer <sas@cd80.net> | 2015-09-14 16:51:58 +0000 |
commit | e0f603fad52c1bab4b1b096b7977d8fcb72aca94 (patch) | |
tree | a8ed8cdbe692678c45190f65d2c56ec8ba5f1df3 /lldb/source/Plugins/Process/POSIX | |
parent | 6ae0a630b88f7ccc3cc272739f6020645ccadb31 (diff) | |
download | bcm5719-llvm-e0f603fad52c1bab4b1b096b7977d8fcb72aca94.tar.gz bcm5719-llvm-e0f603fad52c1bab4b1b096b7977d8fcb72aca94.zip |
Use SI_KERNEL on platforms defining it
Summary:
Linux and FreeBSD occasionally send SI_KERNEL codes, nonexistent on other platforms.
Problem caught on NetBSD.
Reviewers: joerg, sas
Subscribers: sas, lldb-commits, emaste
Differential Revision: http://reviews.llvm.org/D12659
Change by Kamil Rytarowski <n54@gmx.com>
llvm-svn: 247579
Diffstat (limited to 'lldb/source/Plugins/Process/POSIX')
-rw-r--r-- | lldb/source/Plugins/Process/POSIX/CrashReason.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/CrashReason.cpp b/lldb/source/Plugins/Process/POSIX/CrashReason.cpp index 6de13f470c5..44409a4ce55 100644 --- a/lldb/source/Plugins/Process/POSIX/CrashReason.cpp +++ b/lldb/source/Plugins/Process/POSIX/CrashReason.cpp @@ -28,11 +28,12 @@ GetCrashReasonForSIGSEGV(const siginfo_t& info) switch (info.si_code) { +#ifdef SI_KERNEL case SI_KERNEL: - // Linux will occasionally send spurious SI_KERNEL codes. - // (this is poorly documented in sigaction) + // Some platforms will occasionally send nonstandard spurious SI_KERNEL codes. // One way to get this is via unaligned SIMD loads. return CrashReason::eInvalidAddress; // for lack of anything better +#endif case SEGV_MAPERR: return CrashReason::eInvalidAddress; case SEGV_ACCERR: |