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 a632de6..806847a 100644 (file)
@@ -1,5 +1,9 @@
 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.
        (exp_descriptor_f): New global.
        (f_language_defn): Use exp_descriptor_f instead of
index 5e98094..c223d36 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;