Re: [PATCH v2 22/25] Make main_ui be heap allocated

Yao Qi
2016-03-22T10:14:57Z

Pedro Alves <palves@redhat.com> writes:

> ---
> gdb/event-top.c | 7 +++----
> gdb/main.c | 27 ++++++++++++---------------
> gdb/top.c | 37 +++++++++++++++++++++++++++++++++++++
> gdb/top.h | 5 +++++
> 4 files changed, 57 insertions(+), 19 deletions(-)
>
> diff --git a/gdb/event-top.c b/gdb/event-top.c
> index 436edf7..69f6be7 100644
> --- a/gdb/event-top.c
> +++ b/gdb/event-top.c
> @@ -362,11 +362,10 @@ top_level_prompt (void)
> return xstrdup (prompt);
> }
>
> -static struct ui main_ui_;
>
> -struct ui *main_ui = &main_ui_;
> -struct ui *current_ui = &main_ui_;
> -struct ui *ui_list = &main_ui_;
> +struct ui *main_ui;
> +struct ui *current_ui;
> +struct ui *ui_list;

We need comments to "main_ui" and "current_ui". I am carrying a
question "what is the main UI" since patch 06.

--
Yao (齐尧)