diff options
author | Tom Tromey <tom@tromey.com> | 2017-04-07 15:37:25 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-04-12 11:16:19 -0600 |
commit | 156d9eab863f40fc812245cf1213abbe12d192b3 (patch) | |
tree | d4ac157ce5cd9fe88f8906f233c00f6ccebf3e12 /gdb/c-exp.y | |
parent | 4d89769a7b4e38e94a6e027281b36eff71fc8214 (diff) | |
download | gdb-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/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index b2fc195..283b737 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -3188,8 +3188,8 @@ c_parse (struct parser_state *par_state) gdb_assert (! macro_original_text); make_cleanup (scan_macro_cleanup, 0); - make_cleanup_restore_integer (&yydebug); - yydebug = parser_debug; + scoped_restore restore_yydebug = make_scoped_restore (&yydebug, + parser_debug); /* Initialize some state used by the lexer. */ last_was_structop = 0; |