gdb/fortran: Enable debugging of the Fortran parser

This commit allows 'set debug parser on' to work for the Fortran
parser.

gdb/ChangeLog:

	* f-exp.y (f_parse): Set yydebug.
This commit is contained in:
Andrew Burgess 2019-01-17 14:42:15 +00:00
parent 9dad4a58a1
commit e454224fa8
2 changed files with 6 additions and 0 deletions

View 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.

View 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;