This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Expand keyword lexing intelligence in the linespec parser.
- From: Keith Seitz <keiths at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 23 Mar 2015 13:34:16 -0700
- Subject: Re: [PATCH] Expand keyword lexing intelligence in the linespec parser.
- Authentication-results: sourceware.org; auth=none
- References: <20150320203235 dot 29105 dot 19172 dot stgit at valrhona dot uglyboxes dot com> <20150323133126 dot GF5438 at adacore dot com> <55107622 dot 2000106 at redhat dot com>
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 <keiths@redhat.com>
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.
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 *
linespec_lexer_lex_keyword (const char *p)