aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-winsource.h
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-winsource.h
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-winsource.h')
-rw-r--r--gdb/tui/tui-winsource.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index f914c0a..adf4af4 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -34,7 +34,7 @@ extern void tui_update_all_breakpoint_info (void);
/* Scan the source window and the breakpoints to update the hasBreak
information for each line. Returns 1 if something changed and the
execution window must be refreshed. */
-extern int tui_update_breakpoint_info (struct tui_win_info *win,
+extern int tui_update_breakpoint_info (struct tui_source_window_base *win,
int current_only);
/* Function to display the "main" routine. */
@@ -59,12 +59,12 @@ extern void tui_erase_exec_info_content (struct tui_source_window_base *);
extern void tui_clear_exec_info_content (struct tui_source_window_base *);
extern void tui_update_exec_info (struct tui_source_window_base *);
-extern void tui_alloc_source_buffer (struct tui_win_info *);
-extern int tui_line_is_displayed (int,
- struct tui_win_info *,
+extern void tui_alloc_source_buffer (struct tui_source_window_base *);
+extern int tui_line_is_displayed (int,
+ struct tui_source_window_base *,
int);
-extern int tui_addr_is_displayed (CORE_ADDR,
- struct tui_win_info *,
+extern int tui_addr_is_displayed (CORE_ADDR,
+ struct tui_source_window_base *,
int);