From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9501 invoked by alias); 23 Jun 2015 16:43:21 -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 9489 invoked by uid 89); 23 Jun 2015 16:43:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f48.google.com Received: from mail-oi0-f48.google.com (HELO mail-oi0-f48.google.com) (209.85.218.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 23 Jun 2015 16:43:20 +0000 Received: by oiax193 with SMTP id x193so11212964oia.2 for ; Tue, 23 Jun 2015 09:43:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=KfJSdGZnEYUdY4wENkE7qSpyYXiLfo2BhqYPihh9cKI=; b=Elp+R/JriRuXjVJOq1ecDjF71m2PCtk3XRrWpycEpoOtfxG6//ztUZesgrzDyiOiJ9 fklXVNKCtqBPP57M8MkuuActujD7B8CIqt9Ihw8qGPlaAfytHOW1k0M9dTbzno8Kw/LF N0B+obMEtihBQC7GOquhHvebfJamxVktdb2gzrGTq6p86hFGJ4zTG+LZbpHT1BAQVhMi eSZVvVY3pwLjgL0vyiXzGJjkva2oQogxm4STGOc7UGo3r9PjlTF1EZgJ1gisEJFCtmxh NtYwV2vN8Y5eW5vA30lhpPMMH8/4IicO1V4gEKJ0xkxzvx8PFMK1ZmJY1TpX5kt59Hmg TonA== X-Gm-Message-State: ALoCoQmahly+/XUzJbg/APizmJ9lrMIKIAM0DxfyD4e1w+zTdY5U2kvtvsrsSKv1KkSbOXsFVkzU MIME-Version: 1.0 X-Received: by 10.60.147.194 with SMTP id tm2mr30569907oeb.75.1435077798555; Tue, 23 Jun 2015 09:43:18 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Tue, 23 Jun 2015 09:43:18 -0700 (PDT) In-Reply-To: <86vbeeqtha.fsf@gmail.com> References: <1434775646-2625-1-git-send-email-martin.galvan@tallertechnologies.com> <86bng8rtva.fsf@gmail.com> <86vbeeqtha.fsf@gmail.com> Date: Tue, 23 Jun 2015 16:43:00 -0000 Message-ID: Subject: Re: [PING][PATCH] testsuite: Escape a loose '[' character inside a regexp. From: Doug Evans To: Yao Qi Cc: Martin Galvan , gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00485.txt.bz2 On Tue, Jun 23, 2015 at 11:28 AM, Yao Qi wrote: > Doug Evans writes: > >> Generally [ is escaped to avoid Tcl treating it as a subexpression to evaluate. >> 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 [ == \[. > > [ and \[ may be used everywhere in the testsuite, so I don't know how > much useful that we add comment that [ == \[ for gdb_test. Nobody will > realise such difference is documented in the gdb_test comment. That's not a reason to not document it at all. If I can't something to the code I'll add a note to the wiki. > 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. Fine by me.