Introduce cleanup to restore current_uiout
authorSimon Marchi <simark@simark.ca>
Fri, 16 Sep 2016 19:44:29 +0000 (15:44 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Fri, 16 Sep 2016 19:44:29 +0000 (15:44 -0400)
commitcd94f6d535d1ebd8f252185cd84d21fe0df3c893
tree617d4e6f8e0d6b7b644458ccff368c73fc9f9539
parent325fac504a327de9c46a4e5cf9c88ece9d9d7701
Introduce cleanup to restore current_uiout

Make a globally available cleanup from a pre-existing one in infrun.c.
This is used in a following patch.

gdb/ChangeLog:

* infrun.c (restore_current_uiout_cleanup): Move to ui-out.c.
(print_stop_event): Use make_cleanup_restore_current_uiout.
* python/python.c (execute_gdb_command): Likewise.
* ui-out.c (restore_current_uiout_cleanup): Move from infrun.c.
(make_cleanup_restore_current_uiout): New function definition.
* ui-out.h (make_cleanup_restore_current_uiout): New function
declaration.
* utils.c (do_restore_ui_out): Remove.
(make_cleanup_restore_ui_out): Remove.
* utils.h (make_cleanup_restore_ui_out): Remove.
gdb/ChangeLog
gdb/infrun.c
gdb/python/python.c
gdb/ui-out.c
gdb/ui-out.h
gdb/utils.c
gdb/utils.h