Skip to content

Commit

Permalink
[lldb/crashlog] Add support for 32bit frame addresses
Browse files Browse the repository at this point in the history
This patch adds support for 32bit stack frame addresses in the `crashlog`
command.

For crash reports that are generated from a arm64_32 process, `PAGEZERO`
is loaded at 0x00004000 so no code address will be less than 0x4000.

This patch changes the crashlog frame address regex group to match
addresses as small as 4 hex characters.

rdar://100805026

Differential Revision: https://reviews.llvm.org/D135310

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
  • Loading branch information
medismailben committed Nov 3, 2022
1 parent 76c0ee5 commit 3be8643
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lldb/examples/python/crashlog.py
Expand Up @@ -613,10 +613,10 @@ class TextCrashLogParser(CrashLogParser):
frame_regex = re.compile(r'^(\d+)\s+' # id
r'(.+?)\s+' # img_name
r'(?:' +version+ r'\s+)?' # img_version
r'(0x[0-9a-fA-F]{7,})' # addr (7 chars or more)
r'(0x[0-9a-fA-F]{4,})' # addr (4 chars or more)
r' +(.*)' # offs
)
null_frame_regex = re.compile(r'^\d+\s+\?\?\?\s+0{7,} +')
null_frame_regex = re.compile(r'^\d+\s+\?\?\?\s+0{4,} +')
image_regex_uuid = re.compile(r'(0x[0-9a-fA-F]+)' # img_lo
r'\s+-\s+' # -
r'(0x[0-9a-fA-F]+)\s+' # img_hi
Expand Down

0 comments on commit 3be8643

Please sign in to comment.