From: Jason Merrill <jason@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH RFA] gdbhooks: regex syntax error
Date: Tue, 6 Feb 2024 17:07:20 -0500 [thread overview]
Message-ID: <20240206220835.70591-1-jason@redhat.com> (raw)
Briefly tested that break-on-pass completion works. Oddly, it also works
without the patch, but the fix still seems worthwhile. OK for trunk?
-- 8< --
Recent python complains about this pattern with
SyntaxWarning: invalid escape sequence '\s'
because \s in a regular string just means 's'; for it to mean whitespace,
you need \\ or for the pattern to be a raw string.
gcc/ChangeLog:
* gdbhooks.py: Fix regex syntax.
---
gcc/gdbhooks.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/gdbhooks.py b/gcc/gdbhooks.py
index 3fa62652c61..92e38880a70 100644
--- a/gcc/gdbhooks.py
+++ b/gcc/gdbhooks.py
@@ -642,7 +642,7 @@ class PassNames:
self.names = []
with open(os.path.join(srcdir, 'passes.def')) as f:
for line in f:
- m = re.match('\s*NEXT_PASS \(([^,]+).*\);', line)
+ m = re.match(r'\s*NEXT_PASS \(([^,]+).*\);', line)
if m:
self.names.append(m.group(1))
base-commit: c5d34912ad576be1ef19be92f7eabde54b9089eb
--
2.43.0
next reply other threads:[~2024-02-06 22:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 22:07 Jason Merrill [this message]
2024-02-12 23:21 ` PING " Jason Merrill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240206220835.70591-1-jason@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).