aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-02-22 11:41:24 -0700
committerTom Tromey <tromey@adacore.com>2022-04-04 12:46:09 -0600
commit28c4b1ffaa41b17af11984c0383a8a37ea00eef4 (patch)
tree06b2d6ae06fd5025bea076b991dc71500d1ceee6 /gdb/ada-exp.y
parent45016746f1a992e7300cae74761c681a8a3f4fe7 (diff)
downloadgdb-28c4b1ffaa41b17af11984c0383a8a37ea00eef4.zip
gdb-28c4b1ffaa41b17af11984c0383a8a37ea00eef4.tar.gz
gdb-28c4b1ffaa41b17af11984c0383a8a37ea00eef4.tar.bz2
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.
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r--gdb/ada-exp.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 1f98f10..ebf3925 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);