aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-06-06 08:02:18 -0600
committerTom Tromey <tromey@adacore.com>2024-06-12 12:35:38 -0600
commitbf14ed9fd19ac1b133db678565ee7156d4d1906f (patch)
tree19f84cc5598665fe33c2ab0bb3f0d233870993a9 /gdb
parentf7660f9e2ee60befa9d39149c218d215c6d9801f (diff)
downloadgdb-bf14ed9fd19ac1b133db678565ee7156d4d1906f.zip
gdb-bf14ed9fd19ac1b133db678565ee7156d4d1906f.tar.gz
gdb-bf14ed9fd19ac1b133db678565ee7156d4d1906f.tar.bz2
Remove LS_TOKEN_KEYWORD macro
This removes the LS_TOKEN_KEYWORD macro from linespec.c. Reviewed-by: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb')
-rw-r--r--gdb/linespec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c
index b85d57c..3db0030 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -276,7 +276,6 @@ struct linespec_token
};
#define LS_TOKEN_STOKEN(TOK) (TOK).data.string
-#define LS_TOKEN_KEYWORD(TOK) (TOK).data.keyword
/* An instance of the linespec parser. */
@@ -572,7 +571,7 @@ copy_token_string (linespec_token token)
const char *str, *s;
if (token.type == LSTOKEN_KEYWORD)
- return make_unique_xstrdup (LS_TOKEN_KEYWORD (token));
+ return make_unique_xstrdup (token.data.keyword);
str = LS_TOKEN_STOKEN (token).ptr;
s = remove_trailing_whitespace (str, str + LS_TOKEN_STOKEN (token).length);
@@ -905,7 +904,7 @@ linespec_lexer_lex_one (linespec_parser *parser)
if (keyword != NULL)
{
parser->lexer.current.type = LSTOKEN_KEYWORD;
- LS_TOKEN_KEYWORD (parser->lexer.current) = keyword;
+ parser->lexer.current.data.keyword = keyword;
/* We do not advance the stream here intentionally:
we would like lexing to stop when a keyword is seen.