+2019-08-13 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-winsource.h (struct tui_source_window_base)
+ <show_source_content>: Declare.
+ (tui_show_source_content): Don't declare.
+ * tui/tui-winsource.c (tui_update_source_window_as_is): Update.
+ (tui_source_window_base::show_source_content): Rename from
+ tui_show_source_content.
+ (tui_source_window_base::refresh_all): Update.
+ * tui/tui-layout.c (show_source_disasm_command)
+ (show_source_or_disasm_and_command): Update.
+
2019-08-13 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c (tui_erase_source_content)
struct tui_locator_window *locator = tui_locator_win_info_ptr ();
gdb_assert (locator != nullptr);
- tui_show_source_content (TUI_SRC_WIN);
+ TUI_SRC_WIN->show_source_content ();
if (TUI_DISASM_WIN == NULL)
tui_win_list[DISASSEM_WIN] = new tui_disasm_window ();
TUI_DISASM_WIN->reset (asm_height,
TUI_DISASM_WIN->m_has_locator = true;
locator->make_visible (true);
tui_show_locator_content ();
- tui_show_source_content (TUI_DISASM_WIN);
+ TUI_DISASM_WIN->show_source_content ();
if (TUI_CMD_WIN == NULL)
tui_win_list[CMD_WIN] = new tui_cmd_window ();
win_info->m_has_locator = true;
locator->make_visible (true);
tui_show_locator_content ();
- tui_show_source_content (win_info);
+ win_info->show_source_content ();
if (TUI_CMD_WIN == NULL)
tui_win_list[CMD_WIN] = new tui_cmd_window ();
else
{
tui_update_breakpoint_info (win_info, nullptr, false);
- tui_show_source_content (win_info);
+ win_info->show_source_content ();
tui_update_exec_info (win_info);
if (win_info->type == SRC_WIN)
{
}
void
-tui_show_source_content (struct tui_source_window_base *win_info)
+tui_source_window_base::show_source_content ()
{
- if (!win_info->content.empty ())
+ if (!content.empty ())
{
int lineno;
- for (lineno = 1; lineno <= win_info->content.size (); lineno++)
- tui_show_source_line (win_info, lineno);
+ for (lineno = 1; lineno <= content.size (); lineno++)
+ tui_show_source_line (this, lineno);
}
else
- tui_erase_source_content (win_info);
+ tui_erase_source_content (this);
- win_info->check_and_display_highlight_if_needed ();
- win_info->refresh_window ();
+ check_and_display_highlight_if_needed ();
+ refresh_window ();
}
/* See tui-data.h. */
void
tui_source_window_base::refresh_all ()
{
- tui_show_source_content (this);
+ show_source_content ();
check_and_display_highlight_if_needed ();
tui_erase_exec_info_content (this);
tui_update_exec_info (this);
void reset (int height, int width,
int origin_x, int origin_y) override;
+ void show_source_content ();
+
/* Does the locator belong to this window? */
bool m_has_locator = false;
/* Execution information window. */
int);
extern void tui_clear_source_content (struct tui_source_window_base *);
extern void tui_erase_source_content (struct tui_source_window_base *);
-extern void tui_show_source_content (struct tui_source_window_base *);
extern void tui_set_exec_info_content (struct tui_source_window_base *);
extern void tui_show_exec_info_content (struct tui_source_window_base *);
extern void tui_erase_exec_info_content (struct tui_source_window_base *);