[Lldb-commits] [PATCH] D11176: [LLDB][MIPS] To handle SI_KERNEL generated for invalid 64 bit address
Oleksiy Vyalov
ovyalov at google.com
Mon Jul 27 19:09:57 PDT 2015
ovyalov added inline comments.
================
Comment at: source/Plugins/Process/Linux/NativeThreadLinux.cpp:268
@@ +267,3 @@
+ //In case of MIPS64 target, SI_KERENEL is generated for invalid 64bit address.
+ if (info->si_signo == SIGBUS && info->si_code == SI_KERNEL)
+ {
----------------
As an option to make more concise:
```
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));
```
================
Comment at: source/Plugins/Process/Linux/NativeThreadLinux.cpp:268
@@ +267,3 @@
+ //In case of MIPS64 target, SI_KERENEL is generated for invalid 64bit address.
+ if (info->si_signo == SIGBUS && info->si_code == SI_KERNEL)
+ {
----------------
ovyalov wrote:
> As an option to make more concise:
>
> ```
> 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));
>
> ```
Please make sure that the change isn't introducing test regressions on Linux.
Repository:
rL LLVM
http://reviews.llvm.org/D11176
More information about the lldb-commits
mailing list