Make current_ui_out be per UI

Similarly to gdb_stdout&co.

gdb/ChangeLog:
2016-06-21  Pedro Alves  <palves@redhat.com>

	* top.c: Call gen_ret_current_ui_field_ptr for current_uiout.
	* top.h (struct ui) <m_current_uiout>: New field.
	* ui-out.c (current_uiout): Delete.
	* ui-out.h (current_uiout): Delete.
	(current_ui_current_uiout_ptr): New declaration.
	(current_uiout): Reimplement as wrapper around
	current_ui_current_uiout_ptr.
This commit is contained in:
Pedro Alves 2016-06-21 01:11:48 +01:00
parent 23ff98d2fe
commit b6dcde571e
5 changed files with 16 additions and 6 deletions

View file

@ -147,11 +147,6 @@ pop_level (struct ui_out *uiout,
return uiout->level + 1;
}
/* FIXME: This should not be a global, but something passed down from main.c
or top.c. */
struct ui_out *current_uiout = NULL;
/* These are the interfaces to implementation functions. */
static void uo_table_begin (struct ui_out *uiout, int nbrofcols,