Patchwork [16/19] Remove tui_erase_exec_info_content

login
register
mail settings
Submitter Tom Tromey
Date Aug. 3, 2019, 1:29 p.m.
Message ID <20190803132925.25074-17-tom@tromey.com>
Download mbox | patch
Permalink /patch/33946/
State New
Headers show

Comments

Tom Tromey - Aug. 3, 2019, 1:29 p.m.
One call to tui_erase_exec_info_content can be removed.  This call is
not needed because the function in question then immediately sets the
execution info window contents.

Once this is done, tui_clear_exec_info_content is just a wrapper for
the only call to tui_erase_exec_info_content, so
tui_erase_exec_info_content can be renamed and the wrapper function
removed.

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

	* tui/tui-winsource.h (tui_erase_exec_info_content): Don't
	declare.
	* tui/tui-winsource.c (tui_source_window_base::refresh_all): Don't
	call tui_erase_exec_info_content.
	(tui_clear_exec_info_content): Rename from
	tui_erase_exec_info_content.
	(tui_clear_exec_info_content): Delete.
---
 gdb/ChangeLog           | 10 ++++++++++
 gdb/tui/tui-winsource.c |  9 +--------
 gdb/tui/tui-winsource.h |  1 -
 3 files changed, 11 insertions(+), 9 deletions(-)

Patch

diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index c99e207b011..ed2af064c47 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -334,7 +334,6 @@  tui_source_window_base::refresh_all ()
 {
   show_source_content ();
   check_and_display_highlight_if_needed ();
-  tui_erase_exec_info_content (this);
   update_exec_info ();
 }
 
@@ -657,7 +656,7 @@  tui_source_window_base::show_exec_info_content ()
 
 
 void
-tui_erase_exec_info_content (struct tui_source_window_base *win_info)
+tui_clear_exec_info_content (struct tui_source_window_base *win_info)
 {
   struct tui_gen_win_info *exec_info = win_info->execution_info;
 
@@ -665,12 +664,6 @@  tui_erase_exec_info_content (struct tui_source_window_base *win_info)
   exec_info->refresh_window ();
 }
 
-void
-tui_clear_exec_info_content (struct tui_source_window_base *win_info)
-{
-  tui_erase_exec_info_content (win_info);
-}
-
 /* Function to update the execution info window.  */
 void
 tui_source_window_base::update_exec_info ()
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index c902ee0f17e..d8a84b01846 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -188,7 +188,6 @@  extern void tui_update_source_windows_with_line (struct symtab *,
 						 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_erase_exec_info_content (struct tui_source_window_base *);
 extern void tui_clear_exec_info_content (struct tui_source_window_base *);
 
 extern void tui_alloc_source_buffer (struct tui_source_window_base *);