diff options
author | Sean Callanan <scallanan@apple.com> | 2013-01-12 02:11:49 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2013-01-12 02:11:49 +0000 |
commit | c51cd47549c73c7dfbab855efa667856058d0702 (patch) | |
tree | 79de84ba05551098b324c5ddbef2d67e7b1ad81e /lldb/examples/python/crashlog.py | |
parent | 0bf0bafbc9fa2cf204b8b274dd3e1499572ab595 (diff) | |
download | llvm-c51cd47549c73c7dfbab855efa667856058d0702.zip llvm-c51cd47549c73c7dfbab855efa667856058d0702.tar.gz llvm-c51cd47549c73c7dfbab855efa667856058d0702.tar.bz2 |
Made crashlog.py handle cases where a parent
process's name contains spaces. Thanks to
Justin Seyster for the patch.
<rdar://problem/13002540>
llvm-svn: 172294
Diffstat (limited to 'lldb/examples/python/crashlog.py')
-rwxr-xr-x | lldb/examples/python/crashlog.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py index 01e284d..e3fac78 100755 --- a/lldb/examples/python/crashlog.py +++ b/lldb/examples/python/crashlog.py @@ -83,6 +83,7 @@ PARSE_MODE_SYSTEM = 4 class CrashLog(symbolication.Symbolicator): """Class that does parses darwin crash logs""" + parent_process_regex = re.compile('^Parent Process:\s*(.*)\[(\d+)\]'); thread_state_regex = re.compile('^Thread ([0-9]+) crashed with') thread_regex = re.compile('^Thread ([0-9]+)([^:]*):(.*)') frame_regex = re.compile('^([0-9]+) +([^ ]+) *\t?(0x[0-9a-fA-F]+) +(.*)') @@ -265,9 +266,10 @@ class CrashLog(symbolication.Symbolicator): else: self.process = version_string self.process_compatability_version = version_string - elif line.startswith ('Parent Process:'): - (self.parent_process_name, pid_with_brackets) = line[15:].strip().split() - self.parent_process_id = pid_with_brackets.strip('[]') + elif self.parent_process_regex.search(line): + parent_process_match = self.parent_process_regex.search(line) + self.parent_process_name = parent_process_match.group(1) + self.parent_process_id = parent_process_match.group(2) elif line.startswith ('Exception Type:'): self.thread_exception = line[15:].strip() continue |