diff options
author | Tom Tromey <tom@tromey.com> | 2019-07-06 21:19:45 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-08-15 12:29:28 -0600 |
commit | 3891b65efe614fe2e2f7e75e7f5ec8964f7fd96b (patch) | |
tree | 963216261c95876c9e617f0c5f6f91f558cb5e13 /gdb/tui/tui-data.c | |
parent | ee556432c44dd5dbcf22c4086774bd29ded5b208 (diff) | |
download | gdb-3891b65efe614fe2e2f7e75e7f5ec8964f7fd96b.zip gdb-3891b65efe614fe2e2f7e75e7f5ec8964f7fd96b.tar.gz gdb-3891b65efe614fe2e2f7e75e7f5ec8964f7fd96b.tar.bz2 |
Change TUI source window iteration
Currently the TUI does separate bookkeeping to track which source
windows exist. It seems better to me to just refer to the list of
windows for this, so this patch removes the special handling and
instead adds a new iterator.
gdb/ChangeLog
2019-08-15 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_iterator): New.
(struct tui_source_windows): New.
* tui/tui-winsource.c (tui_display_main): Update.
* tui/tui-win.c (tui_resize_all, tui_adjust_win_heights)
(new_height_ok, parse_scrolling_args): Update.
* tui/tui-layout.c (show_layout, show_data): Update.
* tui/tui-data.h (tui_source_windows, tui_clear_source_windows)
(tui_add_to_source_windows): Don't declare.
* tui/tui-data.c (source_windows, tui_source_windows)
(tui_clear_source_windows, tui_add_to_source_windows): Remove.
Diffstat (limited to 'gdb/tui/tui-data.c')
-rw-r--r-- | gdb/tui/tui-data.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index c308237..fe1f73f 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -36,7 +36,6 @@ struct tui_win_info *tui_win_list[MAX_MAJOR_WINDOWS]; ** Private data ****************************/ static int term_height, term_width; -static std::vector<tui_source_window_base *> source_windows; static struct tui_win_info *win_with_focus = NULL; static int win_resized = FALSE; @@ -88,26 +87,6 @@ tui_set_win_with_focus (struct tui_win_info *win_info) } -/* Accessor for the current source window. Usually there is only one - source window (either source or disassembly), but both can be - displayed at the same time. */ -std::vector<tui_source_window_base *> & -tui_source_windows () -{ - return source_windows; -} - - -/* Clear the list of source windows. Usually there is only one source - window (either source or disassembly), but both can be displayed at - the same time. */ -void -tui_clear_source_windows () -{ - source_windows.clear (); -} - - /* Clear the pertinent detail in the source windows. */ void tui_clear_source_windows_detail () @@ -117,16 +96,6 @@ tui_clear_source_windows_detail () } -/* Add a window to the list of source windows. Usually there is only - one source window (either source or disassembly), but both can be - displayed at the same time. */ -void -tui_add_to_source_windows (struct tui_source_window_base *win_info) -{ - if (source_windows.size () < 2) - source_windows.push_back (win_info); -} - /* Accessor for the term_height. */ int tui_term_height (void) |