aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-16 16:03:54 -0600
committerTom Tromey <tom@tromey.com>2019-06-25 07:48:37 -0600
commitcb2ce89305264543a4014d98bacb26800d92d394 (patch)
treee86e884ade455bdd50ce3039924029caf588ad40 /gdb/tui/tui.c
parentab313b35e505ccab9c23acbe82087b6c22a2088d (diff)
downloadgdb-cb2ce89305264543a4014d98bacb26800d92d394.zip
gdb-cb2ce89305264543a4014d98bacb26800d92d394.tar.gz
gdb-cb2ce89305264543a4014d98bacb26800d92d394.tar.bz2
Derive tui_win_info from tui_gen_win_info
This changes tui_win_info to derive from tui_gen_win_info, rather than having a tui_gen_win_info as a member. This removes a layer of member access from the entire TUI, which is why this patch is so large. This change will enable further removal of switches based on window type. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui.c (tui_rl_other_window, tui_enable) (tui_is_window_visible, tui_get_command_dimension): Update. * tui/tui-winsource.c (tui_update_source_window_as_is) (tui_clear_source_content, tui_erase_source_content) (tui_show_source_line, tui_source_window_base::refill) (tui_source_window_base::do_scroll_horizontal) (tui_source_window_base::set_is_exec_point_at) (tui_update_breakpoint_info, tui_set_exec_info_content) (tui_alloc_source_buffer, tui_line_is_displayed) (tui_addr_is_displayed): Update. * tui/tui-wingeneral.c (tui_unhighlight_win, tui_highlight_win) (tui_check_and_display_highlight_if_needed) (tui_win_info::make_visible, tui_win_info::refresh) (tui_refresh_all): Update. * tui/tui-windata.c (tui_first_data_item_displayed) (tui_delete_data_content_windows, tui_erase_data_content) (tui_display_all_data, tui_data_window::refresh_all) (tui_check_data_values): Update. * tui/tui-win.c (window_name_completer, tui_update_gdb_sizes) (tui_set_win_focus_to, tui_win_info::forward_scroll) (tui_win_info::backward_scroll, tui_refresh_all_win) (tui_resize_all, tui_set_focus, tui_all_windows_info) (update_tab_width, tui_set_win_height, tui_adjust_win_heights) (tui_source_window_base::set_new_height) (tui_data_window::set_new_height) (make_invisible_and_set_new_height) (make_visible_with_new_height, new_height_ok) (parse_scrolling_args): Update. * tui/tui-stack.c (tui_show_frame_info): Update. * tui/tui-source.c (tui_set_source_content) (tui_set_source_content_nil, tui_source_is_displayed) (tui_source_window::do_scroll_vertical): Update. * tui/tui-regs.c (tui_show_registers, tui_show_register_group) (tui_display_registers_from, tui_display_reg_element_at_line) (tui_check_register_values, tui_reg_command): Update. * tui/tui-layout.c (tui_default_win_height) (show_source_disasm_command, show_data, init_and_make_win) (show_source_or_disasm_and_command): Update. * tui/tui-io.c (update_cmdwin_start_line, tui_putc, tui_puts) (tui_redisplay_readline, tui_mld_flush) (tui_mld_erase_entire_line, tui_mld_getc, tui_cont_sig) (tui_getc): Update. * tui/tui-disasm.c (tui_set_disassem_content) (tui_disasm_window::do_scroll_vertical): Update. * tui/tui-data.h (struct tui_gen_win_info) <~tui_gen_win_info>: Now virtual. (struct tui_win_info): Derive from tui_gen_win_info. <~tui_win_info>: Mark as override. <generic>: Remove member. * tui/tui-data.c (tui_cmd_window::clear_detail, tui_next_win) (tui_prev_win, tui_partial_win_by_name, tui_win_info) (~tui_data_window, ~tui_win_info) (tui_free_all_source_wins_content): Update. * tui/tui-command.c (tui_refresh_cmd_win): Update.
Diffstat (limited to 'gdb/tui/tui.c')
-rw-r--r--gdb/tui/tui.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 55a44e8..693c2ff 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -236,9 +236,9 @@ tui_rl_other_window (int count, int key)
if (win_info)
{
tui_set_win_focus_to (win_info);
- if (TUI_DATA_WIN && TUI_DATA_WIN->generic.is_visible)
+ if (TUI_DATA_WIN && TUI_DATA_WIN->is_visible)
TUI_DATA_WIN->refresh_all ();
- keypad (TUI_CMD_WIN->generic.handle, (win_info != TUI_CMD_WIN));
+ keypad (TUI_CMD_WIN->handle, (win_info != TUI_CMD_WIN));
}
return 0;
}
@@ -476,8 +476,8 @@ tui_enable (void)
tui_show_frame_info (0);
tui_set_layout (SRC_COMMAND);
tui_set_win_focus_to (TUI_SRC_WIN);
- keypad (TUI_CMD_WIN->generic.handle, TRUE);
- wrefresh (TUI_CMD_WIN->generic.handle);
+ keypad (TUI_CMD_WIN->handle, TRUE);
+ wrefresh (TUI_CMD_WIN->handle);
tui_finish_init = 0;
}
else
@@ -664,7 +664,7 @@ tui_is_window_visible (enum tui_win_type type)
if (tui_win_list[type] == 0)
return false;
- return tui_win_list[type]->generic.is_visible;
+ return tui_win_list[type]->is_visible;
}
int
@@ -676,8 +676,8 @@ tui_get_command_dimension (unsigned int *width,
return 0;
}
- *width = TUI_CMD_WIN->generic.width;
- *height = TUI_CMD_WIN->generic.height;
+ *width = TUI_CMD_WIN->width;
+ *height = TUI_CMD_WIN->height;
return 1;
}