From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114763 invoked by alias); 23 Jun 2015 16:28:56 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 114754 invoked by uid 89); 23 Jun 2015 16:28:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f171.google.com Received: from mail-pd0-f171.google.com (HELO mail-pd0-f171.google.com) (209.85.192.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 23 Jun 2015 16:28:55 +0000 Received: by pdbci14 with SMTP id ci14so10528541pdb.2 for ; Tue, 23 Jun 2015 09:28:53 -0700 (PDT) X-Received: by 10.68.179.228 with SMTP id dj4mr69855365pbc.141.1435076933463; Tue, 23 Jun 2015 09:28:53 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id e2sm23810668pdi.14.2015.06.23.09.28.51 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 23 Jun 2015 09:28:52 -0700 (PDT) From: Yao Qi To: Doug Evans Cc: Yao Qi , Martin Galvan , gdb-patches Subject: Re: [PING][PATCH] testsuite: Escape a loose '[' character inside a regexp. References: <1434775646-2625-1-git-send-email-martin.galvan@tallertechnologies.com> <86bng8rtva.fsf@gmail.com> Date: Tue, 23 Jun 2015 16:28:00 -0000 In-Reply-To: (Doug Evans's message of "Tue, 23 Jun 2015 10:50:51 -0500") Message-ID: <86vbeeqtha.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00484.txt.bz2 Doug Evans writes: > Generally [ is escaped to avoid Tcl treating it as a subexpression to eva= luate. > But the escaping isn't needed if the string is wrapped in {} braces > which is the case here. Thus to me it feels like it's all the other > escaped brackets that need to be fixed (by changing \[ \] to [ ]). > > OTOH, if one carried that through to completion it would > involve a *lot* of changes. help.exp is replete with them. > So for now I think the thing to do is apply this patch, > *and* add a comment somewhere (the function comment > for gdb_test?) documenting that [ =3D=3D \[. [ and \[ may be used everywhere in the testsuite, so I don't know how much useful that we add comment that [ =3D=3D \[ for gdb_test. Nobody will realise such difference is documented in the gdb_test comment. I agree that it is impractical to change every \[ to [, but in this patch, I am inclined to do the change in the reversed direction, which is to change \[ to [ within proc test_class_help. --=20 Yao (=E9=BD=90=E5=B0=A7)