Change tui_update_exec_info to be a method

This changes tui_update_exec_info to be a method on
tui_source_window_base.

gdb/ChangeLog
2019-08-13  Tom Tromey  <tom@tromey.com>

	* tui/tui-winsource.h (struct tui_source_window_base)
	<update_exec_info>: Declare.
	(tui_update_exec_info): Don't declare.
	* tui/tui-winsource.c (tui_update_source_window_as_is)
	(tui_source_window_base::refresh_all)
	(tui_update_all_breakpoint_info): Update.
	(tui_source_window_base::update_exec_info): Rename from
	tui_update_exec_info.
	* tui/tui-stack.c (tui_show_frame_info): Update.
This commit is contained in:
Tom Tromey 2019-07-05 17:24:07 -06:00
parent 37a4a13104
commit 7ba913dcdf
4 changed files with 21 additions and 9 deletions

View File

@ -1,3 +1,15 @@
2019-08-13 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<update_exec_info>: Declare.
(tui_update_exec_info): Don't declare.
* tui/tui-winsource.c (tui_update_source_window_as_is)
(tui_source_window_base::refresh_all)
(tui_update_all_breakpoint_info): Update.
(tui_source_window_base::update_exec_info): Rename from
tui_update_exec_info.
* tui/tui-stack.c (tui_show_frame_info): Update.
2019-08-13 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)

View File

@ -428,7 +428,7 @@ tui_show_frame_info (struct frame_info *fi)
}
}
tui_update_exec_info (win_info);
win_info->update_exec_info ();
}
return 1;
@ -445,7 +445,7 @@ tui_show_frame_info (struct frame_info *fi)
for (struct tui_source_window_base *win_info : tui_source_windows ())
{
tui_clear_source_content (win_info);
tui_update_exec_info (win_info);
win_info->update_exec_info ();
}
return 1;

View File

@ -106,7 +106,7 @@ tui_update_source_window_as_is (struct tui_source_window_base *win_info,
{
tui_update_breakpoint_info (win_info, nullptr, false);
win_info->show_source_content ();
tui_update_exec_info (win_info);
win_info->update_exec_info ();
if (win_info->type == SRC_WIN)
{
symtab_and_line sal;
@ -335,7 +335,7 @@ tui_source_window_base::refresh_all ()
show_source_content ();
check_and_display_highlight_if_needed ();
tui_erase_exec_info_content (this);
tui_update_exec_info (this);
update_exec_info ();
}
/* See tui-data.h. */
@ -517,7 +517,7 @@ tui_update_all_breakpoint_info (struct breakpoint *being_deleted)
{
if (tui_update_breakpoint_info (win, being_deleted, false))
{
tui_update_exec_info (win);
win->update_exec_info ();
}
}
}
@ -673,10 +673,10 @@ tui_clear_exec_info_content (struct tui_source_window_base *win_info)
/* Function to update the execution info window. */
void
tui_update_exec_info (struct tui_source_window_base *win_info)
tui_source_window_base::update_exec_info ()
{
win_info->set_exec_info_content ();
tui_show_exec_info_content (win_info);
set_exec_info_content ();
tui_show_exec_info_content (this);
}
void

View File

@ -92,6 +92,7 @@ public:
void show_source_content ();
void set_exec_info_content ();
void update_exec_info ();
/* Does the locator belong to this window? */
bool m_has_locator = false;
@ -146,7 +147,6 @@ extern void tui_erase_source_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 *);
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_source_window_base *);
extern int tui_line_is_displayed (int,