diff options
| author | wieDasDing <6884440+dingxiangfei2009@users.noreply.github.com> | 2025-03-04 05:22:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-04 05:22:26 +0800 |
| commit | 69ef2fc908f79d97c6deeee3e2a220688782a62d (patch) | |
| tree | 263a7cb807c438c8f56c86bec96ca338a175a530 /src/etc/lldb_batchmode.py | |
| parent | d4916623403bc29927f467ccb1a80ba836a04139 (diff) | |
| download | rust-69ef2fc908f79d97c6deeee3e2a220688782a62d.tar.gz rust-69ef2fc908f79d97c6deeee3e2a220688782a62d.zip | |
fix: properly escape regexes
Diffstat (limited to 'src/etc/lldb_batchmode.py')
| -rw-r--r-- | src/etc/lldb_batchmode.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/lldb_batchmode.py b/src/etc/lldb_batchmode.py index cf88c53e085..5cc9bb23628 100644 --- a/src/etc/lldb_batchmode.py +++ b/src/etc/lldb_batchmode.py @@ -40,7 +40,7 @@ def print_debug(s): def normalize_whitespace(s): """Replace newlines, tabs, multiple spaces, etc with exactly one space""" - return re.sub("\s+", " ", s) + return re.sub(r"\s+", " ", s) def breakpoint_callback(frame, bp_loc, dict): @@ -234,7 +234,7 @@ try: if ( command == "run" or command == "r" - or re.match("^process\s+launch.*", command) + or re.match(r"^process\s+launch.*", command) ): # Before starting to run the program, let the thread sleep a bit, so all # breakpoint added events can be processed |
