aboutsummaryrefslogtreecommitdiff
path: root/gdb/d-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-04-07 15:37:25 -0600
committerTom Tromey <tom@tromey.com>2017-04-12 11:16:19 -0600
commit156d9eab863f40fc812245cf1213abbe12d192b3 (patch)
treed4ac157ce5cd9fe88f8906f233c00f6ccebf3e12 /gdb/d-exp.y
parent4d89769a7b4e38e94a6e027281b36eff71fc8214 (diff)
downloadgdb-156d9eab863f40fc812245cf1213abbe12d192b3.zip
gdb-156d9eab863f40fc812245cf1213abbe12d192b3.tar.gz
gdb-156d9eab863f40fc812245cf1213abbe12d192b3.tar.bz2
Use scoped_restore in more places
This changes a few more places to use scoped_restore, allowing some cleanup removals. gdb/ChangeLog 2017-04-12 Tom Tromey <tom@tromey.com> * mi/mi-main.c (exec_direction_forward): Remove. (exec_reverse_continue, mi_execute_command): Use scoped_restore. * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use scoped_restore. * guile/guile.c (guile_repl_command, guile_command) (gdbscm_execute_gdb_command): Use scoped_restore. * go-exp.y (go_parse): Use scoped_restore. * d-exp.y (d_parse): Use scoped_restore. * cli/cli-decode.c (cmd_func): Use scoped_restore. * c-exp.y (c_parse): Use scoped_restore.
Diffstat (limited to 'gdb/d-exp.y')
-rw-r--r--gdb/d-exp.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/d-exp.y b/gdb/d-exp.y
index 06eef5f..62df737 100644
--- a/gdb/d-exp.y
+++ b/gdb/d-exp.y
@@ -1629,9 +1629,9 @@ d_parse (struct parser_state *par_state)
back_to = make_cleanup (null_cleanup, NULL);
- make_cleanup_restore_integer (&yydebug);
+ scoped_restore restore_yydebug = make_scoped_restore (&yydebug,
+ parser_debug);
make_cleanup_clear_parser_state (&pstate);
- yydebug = parser_debug;
/* Initialize some state used by the lexer. */
last_was_structop = 0;