diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-22 12:49:06 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-06-25 07:48:48 -0600 |
commit | 21e1c91ef99c3785d1c31314dff574747b4b6e68 (patch) | |
tree | 5dfd28ad97c1469d19312b4ecc9e37a8b14f63a6 /gdb/tui/tui-data.h | |
parent | 115ac53b852ed91e23d97e8357f24216609fa86f (diff) | |
download | gdb-21e1c91ef99c3785d1c31314dff574747b4b6e68.zip gdb-21e1c91ef99c3785d1c31314dff574747b4b6e68.tar.gz gdb-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-data.h')
-rw-r--r-- | gdb/tui/tui-data.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 7cbe376..2e13f30 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -204,7 +204,6 @@ typedef char tui_exec_info_content[TUI_EXECINFO_SIZE]; union tui_which_element { struct tui_source_element source; /* The source elements. */ - struct tui_data_item_window *data_window; /* Data display elements. */ }; struct tui_win_element @@ -477,9 +476,8 @@ struct tui_data_window : public tui_win_info return DATA_NAME; } - /* Start of regs display content. */ - tui_win_content regs_content = NULL; - int regs_content_count = 0; + /* Windows that are used to display registers. */ + std::vector<std::unique_ptr<tui_data_item_window>> regs_content; int regs_column_count = 0; /* Should regs be displayed at all? */ bool display_regs = false; @@ -554,10 +552,7 @@ extern struct tui_win_info *tui_win_list[MAX_MAJOR_WINDOWS]; /* Data Manipulation Functions. */ extern void tui_initialize_static_data (void); extern tui_win_content tui_alloc_content (int, enum tui_win_type); -extern int tui_add_content_elements (struct tui_gen_win_info *, - int); extern void tui_free_win_content (struct tui_gen_win_info *); -extern void tui_free_data_content (tui_win_content, int); extern void tui_free_all_source_wins_content (void); extern struct tui_win_info *tui_partial_win_by_name (const char *); extern enum tui_layout_type tui_current_layout (void); |