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] Remove m_has_locator


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

commit d4ab829a2477d454bd38544f1b88a043ec58581c
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Jul 9 21:22:38 2019 -0600

    Remove m_has_locator
    
    The previous patch removed the only use of m_has_locator, so this
    member can now be removed.
    
    gdb/ChangeLog
    2019-08-16  Tom Tromey  <tom@tromey.com>
    
    	* tui/tui-winsource.h (struct tui_source_window_base)
    	<m_has_locator>: Remove.
    	* tui/tui-layout.c (show_source_disasm_command, show_data)
    	(show_source_or_disasm_and_command): Update.

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

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 08a77e8..9294049 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2019-08-16  Tom Tromey  <tom@tromey.com>
+
+	* tui/tui-winsource.h (struct tui_source_window_base)
+	<m_has_locator>: Remove.
+	* tui/tui-layout.c (show_source_disasm_command, show_data)
+	(show_source_or_disasm_and_command): Update.
+
 2019-08-16  Alan Hayward  <alan.hayward@arm.com>
 
 	* NEWS (Other MI changes): New subsection.
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index d81b8f9..b7c5ed6 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -504,7 +504,6 @@ show_source_disasm_command (void)
 		       tui_term_width (),
 		       0,
 		       0);
-  TUI_SRC_WIN->m_has_locator = false;
 
   struct tui_locator_window *locator = tui_locator_win_info_ptr ();
   gdb_assert (locator != nullptr);
@@ -520,8 +519,6 @@ show_source_disasm_command (void)
 		   tui_term_width (),
 		   0,
 		   (src_height + asm_height) - 1);
-  TUI_SRC_WIN->m_has_locator = false;
-  TUI_DISASM_WIN->m_has_locator = true;
   TUI_DISASM_WIN->show_source_content ();
 
   if (TUI_CMD_WIN == NULL)
@@ -565,8 +562,6 @@ show_data (enum tui_layout_type new_layout)
 	tui_win_list[win_type] = new tui_disasm_window ();
     }
 
-  tui_source_window_base *base
-    = (tui_source_window_base *) tui_win_list[win_type];
   tui_win_list[win_type]->resize (src_height,
 				  tui_term_width (),
 				  0,
@@ -578,7 +573,6 @@ show_data (enum tui_layout_type new_layout)
   TUI_CMD_WIN->resize (TUI_CMD_WIN->height, tui_term_width (),
 		       0, total_height);
 
-  base->m_has_locator = true;
   current_layout = new_layout;
 }
 
@@ -650,7 +644,6 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
 		    0,
 		    0);
 
-  win_info->m_has_locator = true;
   win_info->show_source_content ();
 
   if (TUI_CMD_WIN == NULL)
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index 7304e72..a4167f5 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -138,8 +138,6 @@ public:
   /* Erase the source content.  */
   virtual void erase_source_content () = 0;
 
-  /* Does the locator belong to this window?  */
-  bool m_has_locator = false;
   /* Execution information window.  */
   struct tui_exec_info_window *execution_info;
   /* Used for horizontal scroll.  */


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