aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-out.h
diff options
context:
space:
mode:
authorSimon Marchi <simark@simark.ca>2016-09-16 15:44:29 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2016-09-16 15:44:29 -0400
commitcd94f6d535d1ebd8f252185cd84d21fe0df3c893 (patch)
tree617d4e6f8e0d6b7b644458ccff368c73fc9f9539 /gdb/ui-out.h
parent325fac504a327de9c46a4e5cf9c88ece9d9d7701 (diff)
downloadgdb-cd94f6d535d1ebd8f252185cd84d21fe0df3c893.zip
gdb-cd94f6d535d1ebd8f252185cd84d21fe0df3c893.tar.gz
gdb-cd94f6d535d1ebd8f252185cd84d21fe0df3c893.tar.bz2
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.
Diffstat (limited to 'gdb/ui-out.h')
-rw-r--r--gdb/ui-out.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index 9e1e74d..6a4d78a 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -247,4 +247,8 @@ extern void ui_out_destroy (struct ui_out *uiout);
extern int ui_out_redirect (struct ui_out *uiout, struct ui_file *outstream);
+/* Make a cleanup that restores the previous current uiout. */
+
+extern struct cleanup *make_cleanup_restore_current_uiout (void);
+
#endif /* UI_OUT_H */