This revision was automatically updated to reflect the committed changes. Closed by commit rL243620: [LLDB][MIPS] To handle SI_KERNEL generated for invalid 64 bit address (authored by mohit.bhakkad).
Changed prior to commit: http://reviews.llvm.org/D11176?vs=30799&id=30988#toc Repository: rL LLVM http://reviews.llvm.org/D11176 Files: lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp Index: lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp +++ lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp @@ -256,17 +256,20 @@ 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; + } } }
Index: lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp +++ lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp @@ -256,17 +256,20 @@ 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; + } } }
_______________________________________________ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits