Message ID | 20240206220835.70591-1-jason@redhat.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1851672dyb; Tue, 6 Feb 2024 14:09:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzEdDmYIrz+UQvpCYiiKD1l2m9NubkU61xQ3uU6BbZlAF4f2w4+K9W2gG3AG3RthTnXTIs X-Received: by 2002:a05:6870:7195:b0:218:75c2:cfa5 with SMTP id d21-20020a056870719500b0021875c2cfa5mr3744006oah.46.1707257360862; Tue, 06 Feb 2024 14:09:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707257360; cv=pass; d=google.com; s=arc-20160816; b=dIr9jRAK3GHSSaEWevmX8CavejwNCpmrk/VmHmGxBjjI2e0QJXQAVt4Ft6IAGl78Ot 0qs21Pl91C+tXVjFuAcNT+Jm+OeYF1YBJsi6D2xaz41PeaOba5CNoN8zWE45AFfttGdv 26u4ZshJ2KYaeug7Zs5HnGB5i71maLhAp9sMdsMQqgoXW8Y5pixg8j4TgcsRxXKd2sF5 0K3C9K3tMK4RpMZcA0+mhvTDmabRmiCfQ8ryLdwXbQl4c4wA8M+b0wwKCsHYgRtVY4Hf IrJFwU4oWU5PO1EL9QLa4Ke44QalWr7hKuhobL97jGcKWfcfxaJcSzqMxvNf51/yibTu AqfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=XUZifEH9C3s/p9YLj6Zb5rrpYl3btPwaYLDcg0ceaNI=; fh=TSfEL0SUWw/hihL/lMhrANLHjnwQ77mfPAZNAAze3qA=; b=Z2OzKsKFvsbIPZfw0w7+/VF3BETHxC3t3jC741SdX+oFrOW4gbYf+6EpuKxwj50z5N e+wYliq7Df3GjO+64thQTShxsoBE5H8w0mZrLCIEsoBnQDA/N9o9a+GAEHO8W9cCJBUF tijKyWRJkqSQeSsByzQAbm9x+7rPAsFUX4R+4SHA0sVMNxKMvdX4pmNkfmy7cmR4w+Ig Hi9XTdeuwIssArXuat1MX0g3zEq942qorCwbZGWCts1+aM/ubiWFpjILEv1O6oJrllUu /Nty5Cxj+XCJp5B+CpzKE8+DWhWD2QEmHPFOJIuijpBFUzBf/jR/KObJCjCQQ5vE37Si oqeg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HUwzNUkF; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCWtZa3ki3jon3sk55FlBAda0k6R10msb4BZcvP1vz7QuXxFZK9PF5k01pvCJl18yC7ijlu3cIcOiSaC/Ln5Gb35Ld3t1Q== Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g12-20020ac85d4c000000b0042c0fb47a11si3662600qtx.281.2024.02.06.14.09.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 14:09:20 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HUwzNUkF; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B45F3858408 for <ouuuleilei@gmail.com>; Tue, 6 Feb 2024 22:09:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 854DE3858D33 for <gcc-patches@gcc.gnu.org>; Tue, 6 Feb 2024 22:08:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 854DE3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 854DE3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707257321; cv=none; b=iC6g3ug8lvOL0eqCbr3i/2ogYZ2AZokau+pzGebi0j9d3OYDsGo8BBhPD/7goaoX+WAOzRYMpfdktMQKJY3n2ZfacUc6HmmkysYk6j8hUp0fJ2VNanApC+oDDuaplYcB5e5GXr2RpO8SliMU/UT0hGZJBo3ZJJ3xYfLm/FqkMqw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707257321; c=relaxed/simple; bh=UfPPS4oIaN0WNO25lmob3SBQxRkdQF9Bav5Tb+qsFlE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=AYS8ZMy++GMIxsGRdnGdSeq++VPX9uyaaoVFUwYh5cn58oDA21faVF5zGGioLeww5q0nD8GkpblOrEw9TXNiZIaOJXEGBpSm8Q24WgKrOOhNLD6FYWbIewSJVEIxWthGJhmAv0rmDFeHyoQ3ZeTtozKtjHv0mChZziC0wwA6lJ4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707257319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XUZifEH9C3s/p9YLj6Zb5rrpYl3btPwaYLDcg0ceaNI=; b=HUwzNUkFjRM8hmpgXQfNoClMRaSCWnFjR8R6sA08eoJ+Bs4OafN66wF2LbD76YMbIlqLp0 EpbZYJq8vpLz6n0uSCJ5W6mzUmvYXZqBnWqeQaIOuM/hWTutTo9WiPFFYGI7Xo9y5zjYX7 +1XJIjIEMIlXuQIUjmLydqkW8PWHY+4= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-504-OY7itOuKOwaW1VJ9-78FeQ-1; Tue, 06 Feb 2024 17:08:38 -0500 X-MC-Unique: OY7itOuKOwaW1VJ9-78FeQ-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-785448c774fso572601285a.2 for <gcc-patches@gcc.gnu.org>; Tue, 06 Feb 2024 14:08:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707257317; x=1707862117; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XUZifEH9C3s/p9YLj6Zb5rrpYl3btPwaYLDcg0ceaNI=; b=kIOv4JpCNVw0phqjePBtmXV/cT8XOmDlv2zrvWlL3Yk7hhGYSOUDJg0MmGPnNF1IOP AZnXzmRwOmiZrcSs7P+8dnaqzjBNyKzJjRNedcIFP2hfQy0BEzvZnmfXQhXM62KPMipT zev8RNyOsdS5/SFtovQfmVM5NYDwuJk7ii3bRJggqZis2fvF4XA4MUHyoF4ERPaHc6KX ttHnZ/Ac7aXqiYtHEX1a89NleXVf3A2d50LuU7EARPC+1UipMoIE3aOEjxpYBkv/8sDF gjwN5QQRjtGXCY1yNunSQl+isAw2X+ta5rcOIteNdYqA9Etj7DW1o04it/wNgvkLEkEo B9qA== X-Gm-Message-State: AOJu0Yy3PFDLIVzwIcPLUXWbeWnwrzPwLyfpt3x0+WAkRf6kQDKLQW39 QPR+qscVcSwfre/aS+Uhi6HFpynBO+HkAdzNHHJnJpx6kWIKAiGOQsDDQK5aiR2PfbfYKj3k0SM KQH7KRp97qKB42z8qxxauMRg2R94mwcuQRsq7x7xh7zhpfQuUkGHGfMWJsDBrjxcj+E9gV9ccOS vdV5xUDlUu49ZeyFUyv7eNnw+8ib0Wbw04ZU4= X-Received: by 2002:ad4:5aac:0:b0:68c:3d2a:47e7 with SMTP id u12-20020ad45aac000000b0068c3d2a47e7mr4252786qvg.27.1707257317430; Tue, 06 Feb 2024 14:08:37 -0800 (PST) X-Received: by 2002:ad4:5aac:0:b0:68c:3d2a:47e7 with SMTP id u12-20020ad45aac000000b0068c3d2a47e7mr4252772qvg.27.1707257317069; Tue, 06 Feb 2024 14:08:37 -0800 (PST) Received: from jason-thinkpadp1gen4i.rmtusma.csb (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id qs21-20020a05620a395500b00783f62d1613sm1323961qkn.69.2024.02.06.14.08.36 for <gcc-patches@gcc.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 14:08:36 -0800 (PST) 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 Message-ID: <20240206220835.70591-1-jason@redhat.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_WEB, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790189094125888407 X-GMAIL-MSGID: 1790189094125888407 |
Series |
[RFA] gdbhooks: regex syntax error
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Jason Merrill
Feb. 6, 2024, 10:07 p.m. UTC
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(-) base-commit: c5d34912ad576be1ef19be92f7eabde54b9089eb
Comments
Ping On 2/6/24 17:07, Jason Merrill wrote: > 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
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))