[binutils-gdb] Remove tui_data_window::display_regs

Tom Tromey tromey@sourceware.org
Tue Aug 20 22:50:00 GMT 2019


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

commit 100c2bf31fa9bde80d997a5b39d1a07e0505a1cb
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Jul 13 16:36:07 2019 -0600

    Remove tui_data_window::display_regs
    
    There's no need for tui_data_window::display_regs any more (if there
    ever was).  All the paths through data window construction will end up
    setting this to true.  This patch removes the member.
    
    2019-08-20  Tom Tromey  <tom@tromey.com>
    
    	* tui/tui-regs.h (struct tui_data_window) <display_regs>: Remove.
    	* tui/tui-regs.c (tui_data_window::show_registers): Update.
    	(tui_data_window::check_register_values): Update.

Diff:
---
 gdb/ChangeLog      | 6 ++++++
 gdb/tui/tui-regs.c | 6 +-----
 gdb/tui/tui-regs.h | 2 --
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b49f8fd..91e0e90 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2019-08-20  Tom Tromey  <tom@tromey.com>
 
+	* tui/tui-regs.h (struct tui_data_window) <display_regs>: Remove.
+	* tui/tui-regs.c (tui_data_window::show_registers): Update.
+	(tui_data_window::check_register_values): Update.
+
+2019-08-20  Tom Tromey  <tom@tromey.com>
+
 	* tui/tui-regs.h (struct tui_data_window): Use
 	DISABLE_COPY_AND_ASSIGN.
 	<regs_content>: Change type, removing unique_ptr.
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 675e186..f468940 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -152,10 +152,6 @@ tui_data_window::show_registers (struct reggroup *group)
   if (group == 0)
     group = general_reggroup;
 
-  /* Say that registers should be displayed, even if there is a
-     problem.  */
-  display_regs = true;
-
   if (target_has_registers && target_has_stack && target_has_memory)
     {
       show_register_group (group, get_selected_frame (NULL),
@@ -533,7 +529,7 @@ tui_data_window::refresh_window ()
 void
 tui_data_window::check_register_values (struct frame_info *frame)
 {
-  if (regs_content.empty () && display_regs)
+  if (regs_content.empty ())
     show_registers (current_group);
   else
     {
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index 24ec587..de44557 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -66,8 +66,6 @@ struct tui_data_window : public tui_win_info
   /* Windows that are used to display registers.  */
   std::vector<tui_data_item_window> regs_content;
   int regs_column_count = 0;
-  /* Should regs be displayed at all?  */
-  bool display_regs = false;
   struct reggroup *current_group = nullptr;
 
   /* Answer the number of the last line in the regs display.  If there



More information about the Gdb-cvs mailing list