[Lldb-commits] [lldb] r243620 - [LLDB][MIPS] To handle SI_KERNEL generated for invalid 64 bit address
Mohit K. Bhakkad
mohit.bhakkad at gmail.com
Wed Jul 29 22:38:11 PDT 2015
Author: mohit.bhakkad
Date: Thu Jul 30 00:38:11 2015
New Revision: 243620
URL: http://llvm.org/viewvc/llvm-project?rev=243620&view=rev
Log:
[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
Modified:
lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp?rev=243620&r1=243619&r2=243620&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp Thu Jul 30 00:38:11 2015
@@ -256,17 +256,20 @@ NativeThreadLinux::SetStoppedBySignal(ui
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;
+ }
}
}
More information about the lldb-commits
mailing list