aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-win.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-22 12:49:06 -0600
committerTom Tromey <tom@tromey.com>2019-06-25 07:48:48 -0600
commit21e1c91ef99c3785d1c31314dff574747b4b6e68 (patch)
tree5dfd28ad97c1469d19312b4ecc9e37a8b14f63a6 /gdb/tui/tui-win.c
parent115ac53b852ed91e23d97e8357f24216609fa86f (diff)
downloadbinutils-21e1c91ef99c3785d1c31314dff574747b4b6e68.zip
binutils-21e1c91ef99c3785d1c31314dff574747b4b6e68.tar.gz
binutils-21e1c91ef99c3785d1c31314dff574747b4b6e68.tar.bz2
Separate out data window
This removes "data_window" from union tui_which_element and updates the uses. It also changes how tui_data_window refers to the register data, and changes it not to need the "content" field at all (though as this is in a base class, it can't yet be removed). gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-wingeneral.c (tui_data_window::refresh_window): Update. * tui/tui-windata.c (tui_data_window::first_data_item_displayed) (tui_delete_data_content_windows, tui_display_all_data) (tui_data_window::do_scroll_vertical, tui_display_data_from): Update. * tui/tui-win.c (tui_data_window::set_new_height): Simplify. * tui/tui-regs.c (tui_last_regs_line_no) (tui_line_from_reg_element_no, tui_first_reg_element_no_inline) (tui_show_registers): Update. (tui_show_register_group): Return void. Update. (tui_display_registers_from, tui_display_reg_element_at_line) (tui_display_registers_from_line, tui_check_register_values): Update. * tui/tui-data.h (union tui_which_element) <data_window>: Remove member. (struct tui_data_window) <regs_content>: Now a std::vector. <regs_content_count>: Remove. (tui_add_content_elements, tui_free_data_content): Don't declare. * tui/tui-data.c (tui_data_window::clear_detail): Update. (init_content_element): Remove DATA_WIN case. Add assert. (tui_add_content_elements): Remove. (tui_data_window): Update. (tui_free_data_content): Remove. (free_content_elements): Remove DATA_WIN case.
Diffstat (limited to 'gdb/tui/tui-win.c')
-rw-r--r--gdb/tui/tui-win.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index f43e11a..40b9627 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -1267,12 +1267,10 @@ void
tui_data_window::set_new_height (int height)
{
/* Delete all data item windows. */
- for (int i = 0; i < content_size; i++)
+ for (auto &&win : regs_content)
{
- struct tui_gen_win_info *gen_win_info
- = content[i]->which_element.data_window;
- tui_delete_win (gen_win_info->handle);
- gen_win_info->handle = NULL;
+ tui_delete_win (win->handle);
+ win->handle = NULL;
}
}