[Lldb-commits] [PATCH] D131032: [lldb/crashlog] Update frame regex matcher

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 2 16:34:20 PDT 2022


mib created this revision.
mib added a reviewer: JDevlieghere.
mib added a project: LLDB.
Herald added a project: All.
mib requested review of this revision.
Herald added a subscriber: lldb-commits.

This patch updates the regular expression matching stackframes in
crashlog to allow addresses that are 7 characters long and more (vs. 8
characters previously).

It changes the `0x[0-9a-fA-F]{7}[0-9a-fA-F]+` by `0x[0-9a-fA-F]{7}[0-9a-fA-F]*`.

rdar://97684839

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131032

Files:
  lldb/examples/python/crashlog.py


Index: lldb/examples/python/crashlog.py
===================================================================
--- lldb/examples/python/crashlog.py
+++ lldb/examples/python/crashlog.py
@@ -598,11 +598,11 @@
     thread_regex = re.compile('^Thread ([0-9]+)([^:]*):(.*)')
     app_backtrace_regex = re.compile('^Application Specific Backtrace ([0-9]+)([^:]*):(.*)')
     version = r'(\(.+\)|(arm|x86_)[0-9a-z]+)\s+'
-    frame_regex = re.compile(r'^([0-9]+)' r'\s'                # id
-                             r'+(.+?)'    r'\s+'               # img_name
-                             r'(' +version+ r')?'              # img_version
-                             r'(0x[0-9a-fA-F]{7}[0-9a-fA-F]+)' # addr
-                             r' +(.*)'                         # offs
+    frame_regex = re.compile(r'^([0-9]+)' r'\s+'                # id
+                             r'(.+?)' r'\s+'                    # img_name
+                             r'(' +version+ r')?'               # img_version
+                             r'(0x[0-9a-fA-F]{7}[0-9a-fA-F]*)'  # addr
+                             r' +(.*)'                          # offs
                             )
     null_frame_regex = re.compile(r'^([0-9]+)\s+\?\?\?\s+(0{7}0+) +(.*)')
     image_regex_uuid = re.compile(r'(0x[0-9a-fA-F]+)'            # img_lo


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131032.449477.patch
Type: text/x-patch
Size: 1325 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220802/f3e862ee/attachment.bin>


More information about the lldb-commits mailing list