From 28c4b1ffaa41b17af11984c0383a8a37ea00eef4 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 22 Feb 2022 11:41:24 -0700 Subject: [PATCH] Enable "set debug parser" for Ada I noticed that "set debug parser 1" did not affect Ada parsing. This patch fixes the problem. Because this is rarely useful, and pretty much only for maintainers, I didn't write a test case. --- gdb/ada-exp.y | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y index 1f98f10f984..ebf3925b98c 100644 --- a/gdb/ada-exp.y +++ b/gdb/ada-exp.y @@ -1081,6 +1081,9 @@ ada_parse (struct parser_state *par_state) gdb_assert (par_state != NULL); pstate = par_state; + scoped_restore restore_yydebug = make_scoped_restore (&yydebug, + parser_debug); + lexer_init (yyin); /* (Re-)initialize lexer. */ obstack_free (&temp_parse_space, NULL); obstack_init (&temp_parse_space); -- 2.30.2