Correctly initialize the TUI locator window
authorPatrick Palka <patrick@parcs.ath.cx>
Sat, 27 Jun 2015 00:17:56 +0000 (20:17 -0400)
committerPatrick Palka <patrick@parcs.ath.cx>
Tue, 30 Jun 2015 17:44:25 +0000 (13:44 -0400)
commitc45613e33dbdc646b6fd7f02f86635639e852bfb
tree733c53d9c0ba56bb7c5f101ce6fba404e30732c9
parentd0bf44cb88be21ea009a4fe0e59a3d3e6e545aed
Correctly initialize the TUI locator window

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.

gdb/ChangeLog:

* tui/tui-stack.c (tui_set_locator_info): Explicitly pass
LOCATOR_WIN to tui_alloc_content.
gdb/ChangeLog
gdb/tui/tui-stack.c
This page took 0.026707 seconds and 4 git commands to generate.