From e5ad3859eb59bdb3ec9b6ddcf8d6ab4f6dd8bdb9 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Tue, 28 Aug 2012 23:46:12 +0000 Subject: [PATCH] Instead of using re.split and requiring two spaces between the "regname: regvalue" pairs, use re.findall and specify the regexp of regname: regvalue that we're interested in. llvm-svn: 162806 --- lldb/examples/python/crashlog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py index 07b87ad734d1..2700cd8cbf7a 100755 --- a/lldb/examples/python/crashlog.py +++ b/lldb/examples/python/crashlog.py @@ -316,7 +316,8 @@ class CrashLog(symbolication.Symbolicator): elif parse_mode == PARSE_MODE_THREGS: stripped_line = line.strip() - reg_values = re.split(' +', stripped_line); + # "r12: 0x00007fff6b5939c8 r13: 0x0000000007000006 r14: 0x0000000000002a03 r15: 0x0000000000000c00" + reg_values = re.findall ('([a-zA-Z0-9]+: 0[Xx][0-9a-fA-F]+) *', stripped_line); for reg_value in reg_values: #print 'reg_value = "%s"' % reg_value (reg, value) = reg_value.split(': ')