Skip to content
Snippets Groups Projects
Commit 3681c5b8 authored by Mohit K. Bhakkad's avatar Mohit K. Bhakkad
Browse files

[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
parent 6940581e
No related branches found
No related tags found
No related merge requests found
...@@ -256,17 +256,20 @@ NativeThreadLinux::SetStoppedBySignal(uint32_t signo, const siginfo_t *info) ...@@ -256,17 +256,20 @@ NativeThreadLinux::SetStoppedBySignal(uint32_t signo, const siginfo_t *info)
m_stop_info.details.signal.signo = signo; m_stop_info.details.signal.signo = signo;
m_stop_description.clear(); m_stop_description.clear();
switch (signo) if (info)
{ {
case SIGSEGV: switch (signo)
case SIGBUS: {
case SIGFPE: case SIGSEGV:
case SIGILL: case SIGBUS:
if (! info) case SIGFPE:
break; case SIGILL:
const auto reason = GetCrashReason(*info); //In case of MIPS64 target, SI_KERNEL is generated for invalid 64bit address.
m_stop_description = GetCrashReasonString(reason, reinterpret_cast<uintptr_t>(info->si_addr)); const auto reason = (info->si_signo == SIGBUS && info->si_code == SI_KERNEL) ?
break; CrashReason::eInvalidAddress : GetCrashReason(*info);
m_stop_description = GetCrashReasonString(reason, reinterpret_cast<uintptr_t>(info->si_addr));
break;
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment