This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 22/25] Make main_ui be heap allocated
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 6 May 2016 12:49:54 +0100
- Subject: Re: [PATCH v2 22/25] Make main_ui be heap allocated
- Authentication-results: sourceware.org; auth=none
- References: <1458573675-15478-1-git-send-email-palves at redhat dot com> <1458573675-15478-23-git-send-email-palves at redhat dot com> <86k2kuvmy3 dot fsf at gmail dot com>
On 03/22/2016 10:14 AM, Yao Qi wrote:
> 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.
Good point. I've added comments in v3.
Thanks,
Pedro Alves