aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-wingeneral.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-28 23:54:25 -0600
committerTom Tromey <tom@tromey.com>2019-07-17 12:19:12 -0600
commit098f9ed48e1c94a2624c825ba93d72b163d41196 (patch)
tree14364d15f0a1e887535cbb4d6d40f70fcebe7d47 /gdb/tui/tui-wingeneral.c
parent801109578cd2a6ebd690dd23f0d4a1f4a67aee09 (diff)
downloadgdb-098f9ed48e1c94a2624c825ba93d72b163d41196.zip
gdb-098f9ed48e1c94a2624c825ba93d72b163d41196.tar.gz
gdb-098f9ed48e1c94a2624c825ba93d72b163d41196.tar.bz2
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.
Diffstat (limited to 'gdb/tui/tui-wingeneral.c')
-rw-r--r--gdb/tui/tui-wingeneral.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c
index dc008cd..3dca621 100644
--- a/gdb/tui/tui-wingeneral.c
+++ b/gdb/tui/tui-wingeneral.c
@@ -201,8 +201,7 @@ tui_make_invisible (struct tui_gen_win_info *win_info)
void
tui_source_window_base::make_visible (bool visible)
{
- if (execution_info != nullptr)
- execution_info->make_visible (visible);
+ execution_info->make_visible (visible);
tui_win_info::make_visible (visible);
}