diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-16 14:03:04 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-06-25 07:48:30 -0600 |
commit | 238eb706f902da8afef1d5e3c9fdfeecf688bac3 (patch) | |
tree | d36be41771293a95bd1489fc81ba0d205df0b303 /gdb/tui/tui-data.c | |
parent | 81491aa0968e5bcab0388914f909ccb12e084e32 (diff) | |
download | gdb-238eb706f902da8afef1d5e3c9fdfeecf688bac3.zip gdb-238eb706f902da8afef1d5e3c9fdfeecf688bac3.tar.gz gdb-238eb706f902da8afef1d5e3c9fdfeecf688bac3.tar.bz2 |
Remove struct tui_data_info
Like the previous two patches, this removes struct tui_data_info in
favor of inlining its contents into tui_data_window. This was the
last member of the tui_win_info detail union, so that is removed.
gdb/ChangeLog
2019-06-25 Tom Tromey <tom@tromey.com>
* tui/tui-windata.c (tui_display_all_data)
(tui_display_data_from_line, tui_display_data_from)
(tui_check_data_values, tui_data_window::do_scroll_vertical):
Update.
* tui/tui-regs.c (tui_last_regs_line_no)
(tui_line_from_reg_element_no, tui_first_reg_element_no_inline)
(tui_show_registers, tui_show_register_group)
(tui_display_registers_from, tui_display_reg_element_at_line)
(tui_display_registers_from_line, tui_check_register_values)
(tui_reg_next, tui_reg_prev): Update.
* tui/tui-layout.c (tui_set_layout, show_data): Update.
* tui/tui-data.h (struct tui_data_info): Remove. Move contents to
tui_data_window.
(struct tui_win_info) <detail>: Remove. Add new fields from
tui_data_info.
(TUI_DATA_WIN): Add cast.
* tui/tui-data.c (tui_data_window::clear_detail, tui_data_window)
(~tui_data_window): Simplify.
Diffstat (limited to 'gdb/tui/tui-data.c')
-rw-r--r-- | gdb/tui/tui-data.c | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index f15cf31..48332fa 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -190,12 +190,12 @@ tui_cmd_window::clear_detail () void tui_data_window::clear_detail () { - detail.data_display_info.data_content = NULL; - detail.data_display_info.data_content_count = 0; - detail.data_display_info.regs_content = NULL; - detail.data_display_info.regs_content_count = 0; - detail.data_display_info.regs_column_count = 1; - detail.data_display_info.display_regs = FALSE; + data_content = NULL; + data_content_count = 0; + regs_content = NULL; + regs_content_count = 0; + regs_column_count = 1; + display_regs = FALSE; } /* Accessor for the source execution info ptr. */ @@ -498,13 +498,13 @@ tui_source_window_base::tui_source_window_base (enum tui_win_type type) tui_data_window::tui_data_window () : tui_win_info (DATA_WIN) { - detail.data_display_info.data_content = (tui_win_content) NULL; - detail.data_display_info.data_content_count = 0; - detail.data_display_info.regs_content = (tui_win_content) NULL; - detail.data_display_info.regs_content_count = 0; - detail.data_display_info.regs_column_count = 1; - detail.data_display_info.display_regs = FALSE; - detail.data_display_info.current_group = 0; + data_content = NULL; + data_content_count = 0; + regs_content = NULL; + regs_content_count = 0; + regs_column_count = 1; + display_regs = FALSE; + current_group = 0; } tui_cmd_window::tui_cmd_window () @@ -614,16 +614,14 @@ tui_data_window::~tui_data_window () { if (generic.content != NULL) { - tui_free_data_content (detail.data_display_info.regs_content, - detail.data_display_info.regs_content_count); - detail.data_display_info.regs_content = NULL; - detail.data_display_info.regs_content_count = 0; - tui_free_data_content (detail.data_display_info.data_content, - detail.data_display_info.data_content_count); - detail.data_display_info.data_content = NULL; - detail.data_display_info.data_content_count = 0; - detail.data_display_info.regs_column_count = 1; - detail.data_display_info.display_regs = FALSE; + tui_free_data_content (regs_content, regs_content_count); + regs_content = NULL; + regs_content_count = 0; + tui_free_data_content (data_content, data_content_count); + data_content = NULL; + data_content_count = 0; + regs_column_count = 1; + display_regs = FALSE; generic.content = NULL; generic.content_size = 0; } |