Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lldb/examples/python/crashlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class DarwinImage(symbolication.Image):
except:
dsymForUUIDBinary = ""

dwarfdump_uuid_regex = re.compile("UUID: ([-0-9a-fA-F]+) \(([^\(]+)\) .*")
dwarfdump_uuid_regex = re.compile(r"UUID: ([-0-9a-fA-F]+) \(([^\(]+)\) .*")

def __init__(
self, text_addr_lo, text_addr_hi, identifier, version, uuid, path, verbose
Expand Down Expand Up @@ -501,7 +501,7 @@ def find_image_with_identifier(self, identifier):
for image in self.images:
if image.identifier == identifier:
return image
regex_text = "^.*\.%s$" % (re.escape(identifier))
regex_text = r"^.*\.%s$" % (re.escape(identifier))
regex = re.compile(regex_text)
for image in self.images:
if regex.match(image.identifier):
Expand Down Expand Up @@ -925,7 +925,7 @@ def get(cls):
version = r"(?:" + super().version + r"\s+)?"
address = r"(0x[0-9a-fA-F]{4,})" # 4 digits or more

symbol = """
symbol = r"""
(?:
[ ]+
(?P<symbol>.+)
Expand Down Expand Up @@ -1095,7 +1095,7 @@ def parse_normal(self, line):
self.crashlog.process_identifier = line[11:].strip()
elif line.startswith("Version:"):
version_string = line[8:].strip()
matched_pair = re.search("(.+)\((.+)\)", version_string)
matched_pair = re.search(r"(.+)\((.+)\)", version_string)
if matched_pair:
self.crashlog.process_version = matched_pair.group(1)
self.crashlog.process_compatability_version = matched_pair.group(2)
Expand Down
6 changes: 3 additions & 3 deletions lldb/examples/python/symbolication.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ class Section:
"""Class that represents an load address range"""

sect_info_regex = re.compile("(?P<name>[^=]+)=(?P<range>.*)")
addr_regex = re.compile("^\s*(?P<start>0x[0-9A-Fa-f]+)\s*$")
addr_regex = re.compile(r"^\s*(?P<start>0x[0-9A-Fa-f]+)\s*$")
range_regex = re.compile(
"^\s*(?P<start>0x[0-9A-Fa-f]+)\s*(?P<op>[-+])\s*(?P<end>0x[0-9A-Fa-f]+)\s*$"
r"^\s*(?P<start>0x[0-9A-Fa-f]+)\s*(?P<op>[-+])\s*(?P<end>0x[0-9A-Fa-f]+)\s*$"
)

def __init__(self, start_addr=None, end_addr=None, name=None):
Expand Down Expand Up @@ -557,7 +557,7 @@ def find_images_with_identifier(self, identifier):
if image.identifier == identifier:
images.append(image)
if len(images) == 0:
regex_text = "^.*\.%s$" % (re.escape(identifier))
regex_text = r"^.*\.%s$" % (re.escape(identifier))
regex = re.compile(regex_text)
for image in self.images:
if regex.match(image.identifier):
Expand Down