Always create an execution info window for a source window
authorTom Tromey <tom@tromey.com>
Sat, 29 Jun 2019 05:54:25 +0000 (23:54 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 17 Jul 2019 18:19:12 +0000 (12:19 -0600)
commit098f9ed48e1c94a2624c825ba93d72b163d41196
tree14364d15f0a1e887535cbb4d6d40f70fcebe7d47
parent801109578cd2a6ebd690dd23f0d4a1f4a67aee09
Always create an execution info window for a source window

A source or disassembly window will always have an "execution info"
window (the window along the side that displays breakpoint info), but
this isn't immediately clear from the source.  As a result, some code
has checks to see whether the execution_info is NULL.

This changes the source window base class to always instantiate an
execution_info window, then updates the rest of the code.  It also
simplifies window creation in tui-layout.c.

gdb/ChangeLog
2019-07-17  Tom Tromey  <tom@tromey.com>

* tui/tui-winsource.c (tui_set_exec_info_content): Remove
condition.
* tui/tui-wingeneral.c (tui_source_window_base::make_visible):
Remove condition.
* tui/tui-source.c (tui_source_window_base::reset): New method.
* tui/tui-layout.c (make_command_window): Don't call
init_and_make_win.
(make_source_window, make_disasm_window): Don't call
make_source_or_disasm_window.
(make_data_window): Don't call init_and_make_win.  Change calling
convention.
(show_source_disasm_command, show_data): Simplify.
(make_source_or_disasm_window): Remove.
(show_source_or_disasm_and_command): Simplify.
* tui/tui-data.h (struct tui_gen_win_info) <reset>: Now virtual.
(struct tui_source_window_base) <reset>: Likewise.
<execution_info>: Remove initializer.
* tui/tui-data.c (tui_source_window_base): Initialize
execution_info.
gdb/ChangeLog
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-layout.c
gdb/tui/tui-source.c
gdb/tui/tui-wingeneral.c
gdb/tui/tui-winsource.c