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.
+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.
+
2016-06-21 Pedro Alves <palves@redhat.com>
* ui-out.c (default_ui_out_impl): Delete.
gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stdin)
gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stderr)
gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stdlog)
+gen_ret_current_ui_field_ptr (struct ui_out *, current_uiout)
/* Initialization file name for gdb. This is host-dependent. */
*_unfiltered. In the very near future that restriction shall be
removed - either call shall be unfiltered. (cagney 1999-06-13). */
struct ui_file *m_gdb_stdlog;
+
+ /* The current ui_out. */
+ struct ui_out *m_current_uiout;
};
/* The main UI. This is the UI that is bound to stdin/stdout/stderr.
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,
/* FIXME: This should not be a global but something passed down from main.c
or top.c. */
-extern struct ui_out *current_uiout;
+extern struct ui_out **current_ui_current_uiout_ptr (void);
+#define current_uiout (*current_ui_current_uiout_ptr ())
/* alignment enum */
enum ui_align