From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19559 invoked by alias); 26 Mar 2012 20:36:13 -0000 Received: (qmail 19391 invoked by uid 22791); 26 Mar 2012 20:36:12 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Mar 2012 20:35:58 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2QKZwwP001961 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 26 Mar 2012 16:35:58 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2QKZsoP002854 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 26 Mar 2012 16:35:56 -0400 Message-ID: <4F70D32A.4020600@redhat.com> Date: Mon, 26 Mar 2012 20:36:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 MIME-Version: 1.0 To: Tom Tromey CC: "gdb-patches@sourceware.org ml" Subject: Re: [RFA 1/3] Linespec rewrite: Parsing References: <4F67A319.4090608@redhat.com> <877gy788hz.fsf@fleche.redhat.com> In-Reply-To: <877gy788hz.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-03/txt/msg00891.txt.bz2 On 03/26/2012 12:31 PM, Tom Tromey wrote: >>>>>> "Keith" == Keith Seitz writes: > > Keith> +/* A convenience macro for trimming trailing whitespace > Keith> + from string P. */ > > We have remove_trailing_whitespace now, see cli-utils.h. [cough] I even wrote that... I've changed to using it. > Keith> + *(_p + 1) = '\0'; \ > > I'm curious if this is writing into temporary strings or into the input > string. This is called from copy_token_string. The string is allocated via savestring, so it should be safe to modify the string like this. > I ask because I think the module would generally be friendlier if it > were const-correct and did not write into the input strings. This would > make its behavior more predictable. However I didn't audit it to see > whether this is reasonably practical; and the language parsers may throw > a wrench into this idea. This was a goal. The input stream is never modified. Only a pointer to it is advanced, just like we do today. > I only skimmed the rest, since: > > Keith> I have pushed a patch to my archer branch which permits > Keith> quote-encapsulating the linespec. I have also reverted the > Keith> "invalid" linespec tests. > > ... I think it is time to send fresh patches. Will do. [And I will follow Pedro's advice.] Keith