summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
diff options
context:
space:
mode:
authorMohit K. Bhakkad <mohit.bhakkad@gmail.com>2015-07-30 05:38:11 +0000
committerMohit K. Bhakkad <mohit.bhakkad@gmail.com>2015-07-30 05:38:11 +0000
commit3681c5b850afa3b6bcc89a357e66ac589e32b47b (patch)
treee613b04c318606f46a936820bfe1a6ebae014f50 /lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
parent6940581e456ba1547fd79189f7721e98363e0999 (diff)
downloadbcm5719-llvm-3681c5b850afa3b6bcc89a357e66ac589e32b47b.tar.gz
bcm5719-llvm-3681c5b850afa3b6bcc89a357e66ac589e32b47b.zip
[LLDB][MIPS] To handle SI_KERNEL generated for invalid 64 bit address
Patch by Nitesh Jain Reviewers: clayborg, ovyalov. Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, emaste, lldb-commits. Differential Revision: http://reviews.llvm.org/D11176 llvm-svn: 243620
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
index 7ce95f0087f..ccf4cce7a4a 100644
--- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -256,17 +256,20 @@ NativeThreadLinux::SetStoppedBySignal(uint32_t signo, const siginfo_t *info)
m_stop_info.details.signal.signo = signo;
m_stop_description.clear();
- switch (signo)
+ if (info)
{
- case SIGSEGV:
- case SIGBUS:
- case SIGFPE:
- case SIGILL:
- if (! info)
- break;
- const auto reason = GetCrashReason(*info);
- m_stop_description = GetCrashReasonString(reason, reinterpret_cast<uintptr_t>(info->si_addr));
- break;
+ switch (signo)
+ {
+ case SIGSEGV:
+ case SIGBUS:
+ case SIGFPE:
+ case SIGILL:
+ //In case of MIPS64 target, SI_KERNEL is generated for invalid 64bit address.
+ const auto reason = (info->si_signo == SIGBUS && info->si_code == SI_KERNEL) ?
+ CrashReason::eInvalidAddress : GetCrashReason(*info);
+ m_stop_description = GetCrashReasonString(reason, reinterpret_cast<uintptr_t>(info->si_addr));
+ break;
+ }
}
}
OpenPOWER on IntegriCloud