@@ -92,12 +92,14 @@ def read_plist(s):
92
92
PARSE_MODE_IMAGES = 2
93
93
PARSE_MODE_THREGS = 3
94
94
PARSE_MODE_SYSTEM = 4
95
+ PARSE_MODE_INSTRS = 5
95
96
96
97
97
98
class CrashLog (symbolication .Symbolicator ):
98
99
"""Class that does parses darwin crash logs"""
99
100
parent_process_regex = re .compile ('^Parent Process:\s*(.*)\[(\d+)\]' )
100
101
thread_state_regex = re .compile ('^Thread ([0-9]+) crashed with' )
102
+ thread_instrs_regex = re .compile ('^Thread ([0-9]+) instruction stream' )
101
103
thread_regex = re .compile ('^Thread ([0-9]+)([^:]*):(.*)' )
102
104
app_backtrace_regex = re .compile (
103
105
'^Application Specific Backtrace ([0-9]+)([^:]*):(.*)' )
@@ -469,13 +471,18 @@ def __init__(self, path, verbose):
469
471
thread_idx = int (thread_state_match .group (1 ))
470
472
parse_mode = PARSE_MODE_THREGS
471
473
thread = self .threads [thread_idx ]
472
- else :
473
- thread_match = self .thread_regex .search (line )
474
- if thread_match :
475
- app_specific_backtrace = False
476
- parse_mode = PARSE_MODE_THREAD
477
- thread_idx = int (thread_match .group (1 ))
478
- thread = CrashLog .Thread (thread_idx , False )
474
+ continue
475
+ thread_insts_match = self .thread_instrs_regex .search (line )
476
+ if thread_insts_match :
477
+ parse_mode = PARSE_MODE_INSTRS
478
+ continue
479
+ thread_match = self .thread_regex .search (line )
480
+ if thread_match :
481
+ app_specific_backtrace = False
482
+ parse_mode = PARSE_MODE_THREAD
483
+ thread_idx = int (thread_match .group (1 ))
484
+ thread = CrashLog .Thread (thread_idx , False )
485
+ continue
479
486
continue
480
487
elif line .startswith ('Binary Images:' ):
481
488
parse_mode = PARSE_MODE_IMAGES
@@ -539,6 +546,8 @@ def __init__(self, path, verbose):
539
546
thread .registers [reg .strip ()] = int (value , 0 )
540
547
elif parse_mode == PARSE_MODE_SYSTEM :
541
548
self .system_profile .append (line )
549
+ elif parse_mode == PARSE_MODE_INSTRS :
550
+ pass
542
551
f .close ()
543
552
544
553
def dump (self ):
0 commit comments