[Lldb-commits] [lldb] r289006 - Improve crashlog.py so it can handle more iOS crashlog files.

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 7 16:22:45 PST 2016


Author: gclayton
Date: Wed Dec  7 18:22:45 2016
New Revision: 289006

URL: http://llvm.org/viewvc/llvm-project?rev=289006&view=rev
Log:
Improve crashlog.py so it can handle more iOS crashlog files.

<rdar://problem/29191857>



Modified:
    lldb/trunk/examples/python/crashlog.py

Modified: lldb/trunk/examples/python/crashlog.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/crashlog.py?rev=289006&r1=289005&r2=289006&view=diff
==============================================================================
--- lldb/trunk/examples/python/crashlog.py (original)
+++ lldb/trunk/examples/python/crashlog.py Wed Dec  7 18:22:45 2016
@@ -380,9 +380,15 @@ class CrashLog(symbolication.Symbolicato
                 elif line.startswith('Exception Codes:'):
                     self.thread_exception_data = line[16:].strip()
                     continue
+                elif line.startswith('Exception Subtype:'): # iOS
+                    self.thread_exception_data = line[18:].strip()
+                    continue                                                          
                 elif line.startswith('Crashed Thread:'):
                     self.crashed_thread_idx = int(line[15:].strip().split()[0])
                     continue
+                elif line.startswith('Triggered by Thread:'): # iOS
+                    self.crashed_thread_idx = int(line[20:].strip().split()[0])
+                    continue                    
                 elif line.startswith('Report Version:'):
                     self.version = int(line[15:].strip())
                     continue
@@ -423,6 +429,11 @@ class CrashLog(symbolication.Symbolicato
                         app_specific_backtrace = True
                         idx = int(app_backtrace_match.group(1))
                         thread = CrashLog.Thread(idx, True)
+                elif line.startswith('Last Exception Backtrace:'): # iOS
+                    parse_mode = PARSE_MODE_THREAD
+                    app_specific_backtrace = True
+                    idx = 1
+                    thread = CrashLog.Thread(idx, True)
                 self.info_lines.append(line.strip())
             elif parse_mode == PARSE_MODE_THREAD:
                 if line.startswith('Thread'):




More information about the lldb-commits mailing list