[Lldb-commits] [PATCH] D11176: [LLDB][MIPS] To handle SI_KERNEL generated for invalid 64 bit address
Nitesh Jain
nitesh.jain at imgtec.com
Sun Jul 26 23:17:24 PDT 2015
nitesh.jain retitled this revision from "[LLDB][MIPS] To handle SI_KERENEL generated for invalid 64 bit address" to "[LLDB][MIPS] To handle SI_KERNEL generated for invalid 64 bit address".
nitesh.jain updated the summary for this revision.
nitesh.jain updated this revision to Diff 30678.
nitesh.jain added a comment.
This patch handle checking for SI_KERNEL in NativeThreadLinux.cpp.
Repository:
rL LLVM
http://reviews.llvm.org/D11176
Files:
source/Plugins/Process/Linux/NativeThreadLinux.cpp
Index: source/Plugins/Process/Linux/NativeThreadLinux.cpp
===================================================================
--- source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -256,17 +256,27 @@
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_KERENEL is generated for invalid 64bit address.
+ if (info->si_signo == SIGBUS && info->si_code == SI_KERNEL)
+ {
+ m_stop_description = GetCrashReasonString((const CrashReason)CrashReason::eInvalidAddress,
+ reinterpret_cast<uintptr_t>(info->si_addr));
+ }
+ else
+ {
+ const auto reason = GetCrashReason(*info);
+ m_stop_description = GetCrashReasonString(reason, reinterpret_cast<uintptr_t>(info->si_addr));
+ }
+ break;
+ }
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11176.30678.patch
Type: text/x-patch
Size: 1476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150727/a3898a20/attachment.bin>
More information about the lldb-commits
mailing list