This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] clear_detail can only be called on TUI source windows


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a3504e96544b3f8918c4521116d537a4a07c2106

commit a3504e96544b3f8918c4521116d537a4a07c2106
Author: Tom Tromey <tom@tromey.com>
Date:   Fri Jul 5 12:00:06 2019 -0600

    clear_detail can only be called on TUI source windows
    
    The clear_detail method can only be called on source windows, so
    remove definitions from the base of the class hierarchy, leaving only
    a single non-virtual method.
    
    gdb/ChangeLog
    2019-08-13  Tom Tromey  <tom@tromey.com>
    
    	* tui/tui-winsource.h (struct tui_source_window_base)
    	<clear_detail>: No longer "override".
    	* tui/tui-regs.h (struct tui_data_window) <clear_detail>: Remove.
    	* tui/tui-regs.c (tui_data_window::clear_detail): Remove.
    	* tui/tui-data.h (struct tui_win_info) <clear_detail>: Remove.
    	* tui/tui-command.h (struct tui_cmd_window) <clear_detail>:
    	Remove.
    	* tui/tui-command.c (tui_cmd_window::clear_detail): Remove.

Diff:
---
 gdb/ChangeLog           | 11 +++++++++++
 gdb/tui/tui-command.c   |  8 --------
 gdb/tui/tui-command.h   |  2 --
 gdb/tui/tui-data.h      |  3 ---
 gdb/tui/tui-regs.c      | 10 ----------
 gdb/tui/tui-regs.h      |  1 -
 gdb/tui/tui-winsource.h |  2 +-
 7 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6c4208f..58a32a2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,14 @@
+2019-08-13  Tom Tromey  <tom@tromey.com>
+
+	* tui/tui-winsource.h (struct tui_source_window_base)
+	<clear_detail>: No longer "override".
+	* tui/tui-regs.h (struct tui_data_window) <clear_detail>: Remove.
+	* tui/tui-regs.c (tui_data_window::clear_detail): Remove.
+	* tui/tui-data.h (struct tui_win_info) <clear_detail>: Remove.
+	* tui/tui-command.h (struct tui_cmd_window) <clear_detail>:
+	Remove.
+	* tui/tui-command.c (tui_cmd_window::clear_detail): Remove.
+
 2019-08-13  Tom Tromey  <tromey@adacore.com>
 
 	* tracepoint.c: Don't include readline.h or history.h.
diff --git a/gdb/tui/tui-command.c b/gdb/tui/tui-command.c
index 5af3484..034abd5 100644
--- a/gdb/tui/tui-command.c
+++ b/gdb/tui/tui-command.c
@@ -31,14 +31,6 @@
 /* See tui-command.h.  */
 
 void
-tui_cmd_window::clear_detail ()
-{
-  wmove (handle, 0, 0);
-}
-
-/* See tui-command.h.  */
-
-void
 tui_cmd_window::do_make_visible_with_new_height ()
 {
 #ifdef HAVE_WRESIZE
diff --git a/gdb/tui/tui-command.h b/gdb/tui/tui-command.h
index d2a8ab1..af80b14 100644
--- a/gdb/tui/tui-command.h
+++ b/gdb/tui/tui-command.h
@@ -35,8 +35,6 @@ struct tui_cmd_window : public tui_win_info
 
   DISABLE_COPY_AND_ASSIGN (tui_cmd_window);
 
-  void clear_detail () override;
-
   void make_visible (bool visible) override
   {
   }
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 214f728..5a7c487 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -249,9 +249,6 @@ public:
   {
   }
 
-  /* Clear the pertinent detail in the window.  */
-  virtual void clear_detail () = 0;
-
   /* Called after all the TUI windows are refreshed, to let this
      window have a chance to update itself further.  */
   virtual void refresh_all ()
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index c13a5b1..2765462 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -521,16 +521,6 @@ tui_data_window::do_scroll_vertical (int num_to_scroll)
 /* See tui-regs.h.  */
 
 void
-tui_data_window::clear_detail ()
-{
-  regs_content.clear ();
-  regs_column_count = 1;
-  display_regs = false;
-}
-
-/* See tui-regs.h.  */
-
-void
 tui_data_window::set_new_height (int height)
 {
   /* Delete all data item windows.  */
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index 0646729..b2abfc2 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -53,7 +53,6 @@ struct tui_data_window : public tui_win_info
 
   DISABLE_COPY_AND_ASSIGN (tui_data_window);
 
-  void clear_detail () override;
   void refresh_all () override;
 
   void set_new_height (int height) override;
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index ec44d1d..9d7f0a7 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -67,7 +67,7 @@ protected:
 
 public:
 
-  void clear_detail () override;
+  void clear_detail ();
 
   void make_visible (bool visible) override;
   void refresh_window () override;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]