This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Expand keyword lexing intelligence in the linespec parser.


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]