aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-layout.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-23 14:27:04 -0600
committerTom Tromey <tom@tromey.com>2019-06-25 07:48:50 -0600
commit53e7cdbaa1d8c0c53038226de07d8160d7f66d82 (patch)
tree5a7bb07390157fe841fc65034a7bd7fa843a59bc /gdb/tui/tui-layout.c
parent7908abbf18dde6d3163758e447d72d6d2b267927 (diff)
downloadgdb-53e7cdbaa1d8c0c53038226de07d8160d7f66d82.zip
gdb-53e7cdbaa1d8c0c53038226de07d8160d7f66d82.tar.gz
gdb-53e7cdbaa1d8c0c53038226de07d8160d7f66d82.tar.bz2
Remove union tui_which_element
This removes union tui_which_element, instead moving the content directly into tui_source_window_base. This allows for the deletion of a fair amount of code. Now the TUI window hierarchy is more type-safe. In particular, there is never any confusion now about which members are in use by which subtype. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-winsource.h (tui_update_source_window_as_is) (tui_alloc_source_buffer, tui_line_is_displayed) (tui_addr_is_displayed): Change type of win_info. * tui/tui-winsource.c (tui_update_source_window_as_is) (tui_clear_source_content, tui_show_source_line) (tui_show_source_content, tui_source_window_base::refill) (tui_source_window_base::set_is_exec_point_at) (tui_source_window_base::set_is_exec_point_at) (tui_update_breakpoint_info, tui_set_exec_info_content): Update. (tui_alloc_source_buffer, tui_line_is_displayed) (tui_addr_is_displayed): Change type of win_info. Update. * tui/tui-win.c (tui_resize_all, tui_adjust_win_heights) (tui_source_window_base::do_make_visible_with_new_height): Update. * tui/tui-source.c (tui_set_source_content) (tui_set_source_content_nil) (tui_source_window::do_scroll_vertical): Update. * tui/tui-layout.c (show_layout): Update. * tui/tui-disasm.c (tui_set_disassem_content) (tui_disasm_window::do_scroll_vertical): Update. * tui/tui-data.h (tui_win_content): Remove. (struct tui_gen_win_info) <content, content_size>: Remove. (struct tui_source_element): Add initializers and destructor. (union tui_which_element, struct tui_win_element): Remove. (struct tui_source_window_base) <content>: New field. (struct tui_data_window): Remove destructor. (tui_alloc_content, tui_free_win_content) (tui_free_all_source_wins_content): Don't declare. * tui/tui-data.c (tui_initialize_static_data): Update. (init_content_element, tui_alloc_content): Remove. (~tui_gen_win_info): Update. (~tui_data_window, tui_free_all_source_wins_content) (tui_free_win_content, free_content, free_content_elements): Remove.
Diffstat (limited to 'gdb/tui/tui-layout.c')
-rw-r--r--gdb/tui/tui-layout.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index ad99ec9..9dbb599 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -81,7 +81,6 @@ show_layout (enum tui_layout_type layout)
/* Since the new layout may cause changes in window size, we
should free the content and reallocate on next display of
source/asm. */
- tui_free_all_source_wins_content ();
tui_clear_source_windows ();
if (layout == SRC_DATA_COMMAND
|| layout == DISASSEM_DATA_COMMAND)