This changes tui_display_all_data to be a method on tui_data_window.
This helps cluster uses of the TUI_DATA_WIN global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-windata.h (tui_display_all_data): Don't declare.
* tui/tui-windata.c (tui_data_window::display_all_data): Rename
from tui_display_all_data.
* tui/tui-win.c
(tui_data_window::do_make_visible_with_new_height): Update.
* tui/tui-regs.c (tui_show_registers): Update.
* tui/tui-layout.c (tui_set_layout): Update.
* tui/tui-data.h (struct tui_data_window) <display_all_data>: New
method.
+2019-07-17 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-windata.h (tui_display_all_data): Don't declare.
+ * tui/tui-windata.c (tui_data_window::display_all_data): Rename
+ from tui_display_all_data.
+ * tui/tui-win.c
+ (tui_data_window::do_make_visible_with_new_height): Update.
+ * tui/tui-regs.c (tui_show_registers): Update.
+ * tui/tui-layout.c (tui_set_layout): Update.
+ * tui/tui-data.h (struct tui_data_window) <display_all_data>: New
+ method.
+
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-windata.h (tui_display_data_from): Don't declare.
past the register area (-1) is returned. */
int first_reg_element_no_inline (int line_no) const;
+ /* Displays the data that is in the data window's content. It does
+ not set the content. */
+ void display_all_data ();
+
protected:
void do_scroll_vertical (int num_to_scroll) override;
if (!regs_populate
&& (new_layout == SRC_DATA_COMMAND
|| new_layout == DISASSEM_DATA_COMMAND))
- tui_display_all_data ();
+ TUI_DATA_WIN->display_all_data ();
tui_update_source_windows_with_addr (gdbarch, addr);
data_item_win->highlight = false;
}
TUI_DATA_WIN->current_group = group;
- tui_display_all_data ();
+ TUI_DATA_WIN->display_all_data ();
}
}
void
tui_data_window::do_make_visible_with_new_height ()
{
- tui_display_all_data ();
+ display_all_data ();
}
/* See tui-data.h. */
wrefresh (TUI_DATA_WIN->handle);
}
+/* See tui-data.h. */
-/* This function displays the data that is in the data window's
- content. It does not set the content. */
void
-tui_display_all_data (void)
+tui_data_window::display_all_data ()
{
- if (TUI_DATA_WIN->regs_content.empty ())
+ if (regs_content.empty ())
tui_erase_data_content (NO_DATA_STRING);
else
{
tui_erase_data_content (NULL);
tui_delete_data_content_windows ();
- tui_check_and_display_highlight_if_needed (TUI_DATA_WIN);
+ tui_check_and_display_highlight_if_needed (this);
tui_display_registers_from (0);
}
}
#include "tui/tui-data.h"
extern void tui_erase_data_content (const char *);
-extern void tui_display_all_data (void);
extern void tui_delete_data_content_windows (void);
extern void tui_refresh_data_win (void);