[Lldb-commits] [PATCH] D11176: [LLDB][MIPS] To handle SI_KERNEL generated for invalid 64 bit address

Nitesh Jain nitesh.jain at imgtec.com
Tue Jul 28 03:52:48 PDT 2015


nitesh.jain updated this revision to Diff 30799.
nitesh.jain added a comment.

Fixed typo and modified file as per suggestion . This patch is tested on linux and working without any failures.


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,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;
+        }
     }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11176.30799.patch
Type: text/x-patch
Size: 1220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150728/34f5697f/attachment.bin>


More information about the lldb-commits mailing list