diff mbox

Remove two unused functions from the TUI

Message ID 20190618144242.21317-1-tom@tromey.com
State New
Headers show

Commit Message

Tom Tromey June 18, 2019, 2:42 p.m. UTC
This removes two unused functions from the TUI.  According to
"git grep -G", they have never been used.

gdb/ChangeLog
2019-06-18  Tom Tromey  <tom@tromey.com>

	* tui/tui-data.h (tui_del_window, tui_del_data_windows): Don't
	declare.
	* tui/tui-data.c (tui_del_window, tui_del_data_windows): Remove.
---
 gdb/ChangeLog      |  6 ++++
 gdb/tui/tui-data.c | 77 ----------------------------------------------
 gdb/tui/tui-data.h |  2 --
 3 files changed, 6 insertions(+), 79 deletions(-)

Comments

Tom Tromey June 22, 2019, 9:06 p.m. UTC | #1
>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> This removes two unused functions from the TUI.  According to
Tom> "git grep -G", they have never been used.

Tom> gdb/ChangeLog
Tom> 2019-06-18  Tom Tromey  <tom@tromey.com>

Tom> 	* tui/tui-data.h (tui_del_window, tui_del_data_windows): Don't
Tom> 	declare.
Tom> 	* tui/tui-data.c (tui_del_window, tui_del_data_windows): Remove.

I'm going to check this in.  I'd like to get it in because it is
blocking a much larger TUI refactoring that I nearly have ready.

I have at least one more like this that I'll send soon as well.

Tom
diff mbox

Patch

diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index 2df9cbcd07b..b67cb48c2e6 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -604,59 +604,6 @@  tui_add_content_elements (struct tui_gen_win_info *win_info,
   return index_start;
 }
 
-
-/* Delete all curses windows associated with win_info, leaving
-   everything else intact.  */
-void
-tui_del_window (struct tui_win_info *win_info)
-{
-  struct tui_gen_win_info *generic_win;
-
-  switch (win_info->generic.type)
-    {
-    case SRC_WIN:
-    case DISASSEM_WIN:
-      generic_win = tui_locator_win_info_ptr ();
-      if (generic_win != NULL)
-	{
-	  tui_delete_win (generic_win->handle);
-	  generic_win->handle = NULL;
-	  generic_win->is_visible = FALSE;
-	}
-      if (win_info->detail.source_info.fullname)
-        {
-          xfree (win_info->detail.source_info.fullname);
-          win_info->detail.source_info.fullname = NULL;
-        }
-      generic_win = win_info->detail.source_info.execution_info;
-      if (generic_win != NULL)
-	{
-	  tui_delete_win (generic_win->handle);
-	  generic_win->handle = NULL;
-	  generic_win->is_visible = FALSE;
-	}
-      break;
-    case DATA_WIN:
-      if (win_info->generic.content != NULL)
-	{
-	  tui_del_data_windows (win_info->detail.data_display_info.regs_content,
-				win_info->detail.data_display_info.regs_content_count);
-	  tui_del_data_windows (win_info->detail.data_display_info.data_content,
-				win_info->detail.data_display_info.data_content_count);
-	}
-      break;
-    default:
-      break;
-    }
-  if (win_info->generic.handle != NULL)
-    {
-      tui_delete_win (win_info->generic.handle);
-      win_info->generic.handle = NULL;
-      win_info->generic.is_visible = FALSE;
-    }
-}
-
-
 void
 tui_free_window (struct tui_win_info *win_info)
 {
@@ -743,30 +690,6 @@  tui_free_win_content (struct tui_gen_win_info *win_info)
 }
 
 
-void
-tui_del_data_windows (tui_win_content content, 
-		      int content_size)
-{
-  int i;
-
-  /* Remember that data window content elements are of type struct
-     tui_gen_win_info *, each of which whose single element is a data
-     element.  */
-  for (i = 0; i < content_size; i++)
-    {
-      struct tui_gen_win_info *generic_win
-	= &content[i]->which_element.data_window;
-
-      if (generic_win != NULL)
-	{
-	  tui_delete_win (generic_win->handle);
-	  generic_win->handle = NULL;
-	  generic_win->is_visible = FALSE;
-	}
-    }
-}
-
-
 void
 tui_free_data_content (tui_win_content content, 
 		       int content_size)
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index acefb23bb6d..e08b0ca3dce 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -313,8 +313,6 @@  extern void tui_free_window (struct tui_win_info *);
 extern void tui_free_win_content (struct tui_gen_win_info *);
 extern void tui_free_data_content (tui_win_content, int);
 extern void tui_free_all_source_wins_content (void);
-extern void tui_del_window (struct tui_win_info *);
-extern void tui_del_data_windows (tui_win_content, int);
 extern struct tui_win_info *tui_partial_win_by_name (const char *);
 extern const char *tui_win_name (const struct tui_gen_win_info *);
 extern enum tui_layout_type tui_current_layout (void);