public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Enable "set debug parser" for Ada
@ 2022-04-04 18:50 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2022-04-04 18:50 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=28c4b1ffaa41b17af11984c0383a8a37ea00eef4

commit 28c4b1ffaa41b17af11984c0383a8a37ea00eef4
Author: Tom Tromey <tromey@adacore.com>
Date:   Tue Feb 22 11:41:24 2022 -0700

    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.

Diff:
---
 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-04 18:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 18:50 [binutils-gdb] Enable "set debug parser" for Ada Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).