gdb/fortran: Enable debugging of the Fortran parser
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 17 Jan 2019 14:42:15 +0000 (14:42 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 6 Mar 2019 18:11:31 +0000 (18:11 +0000)
This commit allows 'set debug parser on' to work for the Fortran
parser.

gdb/ChangeLog:

* f-exp.y (f_parse): Set yydebug.

gdb/ChangeLog
gdb/f-exp.y

index a632de69c373862853b63b762987991a52b38a5c..806847a5e6f2241070a25bc70c941c7ad36809aa 100644 (file)
@@ -1,3 +1,7 @@
+2019-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * f-exp.y (f_parse): Set yydebug.
+
 2019-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * f-lang.c (evaluate_subexp_f): New function.
index 5e980944b194989ab3c729bb86b5f482bf165864..c223d366db3484a4ac1766ff854a773c120529e9 100644 (file)
@@ -1211,6 +1211,8 @@ f_parse (struct parser_state *par_state)
 {
   /* Setting up the parser state.  */
   scoped_restore pstate_restore = make_scoped_restore (&pstate);
+  scoped_restore restore_yydebug = make_scoped_restore (&yydebug,
+                                                       parser_debug);
   gdb_assert (par_state != NULL);
   pstate = par_state;