From patchwork Mon Mar 23 20:34:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Seitz X-Patchwork-Id: 5767 Received: (qmail 21523 invoked by alias); 23 Mar 2015 20:34:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 21491 invoked by uid 89); 23 Mar 2015 20:34:21 -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, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 23 Mar 2015 20:34:20 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2NKYHwL029171 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 23 Mar 2015 16:34:17 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2NKYGPC003072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 23 Mar 2015 16:34:16 -0400 Message-ID: <551078C8.60407@redhat.com> Date: Mon, 23 Mar 2015 13:34:16 -0700 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: [PATCH] Expand keyword lexing intelligence in the linespec parser. References: <20150320203235.29105.19172.stgit@valrhona.uglyboxes.com> <20150323133126.GF5438@adacore.com> <55107622.2000106@redhat.com> In-Reply-To: <55107622.2000106@redhat.com> X-IsSubscribed: yes On 03/23/2015 01:22 PM, Keith Seitz wrote: > On 03/23/2015 06:31 AM, Joel Brobecker wrote: >> LGTM. A few minor comments, but otherwise pre-approved. >> >>> +++ b/gdb/linespec.h >>> @@ -152,4 +152,8 @@ extern struct symtabs_and_lines >>> decode_line_with_current_source (char *, int); >>> >>> extern struct symtabs_and_lines decode_line_with_last_displayed >>> (char *, int); >>> >>> +/* Does P represent one of the keywords? If so, return >>> + the keyword. If not, return NULL. */ >>> + >>> +extern const char *linespec_lexer_lex_keyword (const char *p); >> >> You already have the function documented in linespec.c, so no need >> to duplicate it here. > > Bah. I forgot all about that. It's been a hectic Monday. I'll push a > patch to remove this very soon. And I've pushed the following patch as a result. Sorry about that! Keith commit 32b40af94e919e235c21486110311647cbeecf2e Author: Keith Seitz Date: Mon Mar 23 13:32:01 2015 -0700 Update comment of linespec_lexer_lex_keyword. gdb/ChangeLog * linespec.c (linespec_lexer_lex_keyword): Update comment. linespec_lexer_lex_keyword (const char *p) diff --git a/gdb/linespec.c b/gdb/linespec.c index 90c07a2..d2089b5 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -414,8 +414,7 @@ linespec_lexer_lex_number (linespec_parser *parser, linespec_token *tokenp) return 1; } -/* Does P represent one of the keywords? If so, return - the keyword. If not, return NULL. */ +/* See linespec.h. */ const char *