This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] Correctly initialize the TUI locator window
- From: Pedro Alves <palves at redhat dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>, gdb-patches at sourceware dot org
- Date: Tue, 30 Jun 2015 09:36:03 +0100
- Subject: Re: [PATCH 1/3] Correctly initialize the TUI locator window
- Authentication-results: sourceware.org; auth=none
- References: <1435372525-1374-1-git-send-email-patrick at parcs dot ath dot cx>
On 06/27/2015 03:35 AM, Patrick Palka wrote:
> The call to tui_alloc_content in tui_set_locator_info passes
> locator->type as the type of the window whose content is being
> allocated. This may seem correct but it's actually not because when
> this code path actually get executed locator->type has not yet been to
> set LOCATOR_WIN so it defaults to 0 i.e. SRC_WIN. Thus we allocate the
> content of the locator window as if it was the source window. This
> oversight turns out not to be a big deal in practice but the patch that
> follows depends on the locator's proc_name and full_name arrays to be
> initialized to the empty string which is done by tui_alloc_content if
> we pass to it LOCATOR_WIN.
>
> This patch fixes this bug by explicitly passing LOCATOR_WIN to
> tui_alloc_content.
OK.
Thanks,
Pedro Alves