public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Remove struct tui_layout_def
Date: Tue, 13 Aug 2019 20:53:00 -0000	[thread overview]
Message-ID: <20190813205334.66850.qmail@sourceware.org> (raw)

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

commit 2afade5dbe1bf99db3f6ab625ca540be030e0e41
Author: Tom Tromey <tom@tromey.com>
Date:   Fri Jul 5 12:11:52 2019 -0600

    Remove struct tui_layout_def
    
    "layout_def" isn't actually used in the TUI, so remove it.
    
    gdb/ChangeLog
    2019-08-13  Tom Tromey  <tom@tromey.com>
    
    	* tui/tui-layout.c (tui_set_layout): Update.
    	* tui/tui-data.h (struct tui_layout_def): Remove.
    	(tui_layout_def): Don't declare.
    	* tui/tui-data.c (layout_def): Remove.
    	(tui_layout_def): Remove.

Diff:
---
 gdb/ChangeLog        |  8 ++++++++
 gdb/tui/tui-data.c   | 11 -----------
 gdb/tui/tui-data.h   |  7 -------
 gdb/tui/tui-layout.c |  5 -----
 4 files changed, 8 insertions(+), 23 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 58a32a2..c0429ec 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
 2019-08-13  Tom Tromey  <tom@tromey.com>
 
+	* tui/tui-layout.c (tui_set_layout): Update.
+	* tui/tui-data.h (struct tui_layout_def): Remove.
+	(tui_layout_def): Don't declare.
+	* tui/tui-data.c (layout_def): Remove.
+	(tui_layout_def): Remove.
+
+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.
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index 2748230..af5e509 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -40,9 +40,6 @@ static int term_height, term_width;
 static struct tui_locator_window _locator;
 static std::vector<tui_source_window_base *> source_windows;
 static struct tui_win_info *win_with_focus = NULL;
-static struct tui_layout_def layout_def = {
-  SRC_WIN,			/* DISPLAY_MODE */
-};
 
 static int win_resized = FALSE;
 
@@ -77,14 +74,6 @@ tui_set_win_resized_to (int resized)
 }
 
 
-/* Answer a pointer to the current layout definition.  */
-struct tui_layout_def *
-tui_layout_def (void)
-{
-  return &layout_def;
-}
-
-
 /* Answer the window with the logical focus.  */
 struct tui_win_info *
 tui_win_with_focus (void)
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 5a7c487..7451810 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -151,12 +151,6 @@ struct tui_line_or_address
     } u;
 };
 
-/* Current Layout definition.  */
-struct tui_layout_def
-{
-  enum tui_win_type display_mode;
-};
-
 /* Flags to tell what kind of breakpoint is at current line.  */
 enum tui_bp_flag
 {
@@ -400,7 +394,6 @@ extern void tui_clear_source_windows_detail (void);
 extern void tui_add_to_source_windows (struct tui_source_window_base *);
 extern struct tui_win_info *tui_win_with_focus (void);
 extern void tui_set_win_with_focus (struct tui_win_info *);
-extern struct tui_layout_def *tui_layout_def (void);
 extern int tui_win_resized (void);
 extern void tui_set_win_resized_to (int);
 
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index a5709c5..93687f3 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -118,7 +118,6 @@ tui_set_layout (enum tui_layout_type layout_type)
   struct gdbarch *gdbarch;
   CORE_ADDR addr;
   struct tui_win_info *win_with_focus = tui_win_with_focus ();
-  struct tui_layout_def *layout_def = tui_layout_def ();
 
   extract_display_start_addr (&gdbarch, &addr);
 
@@ -135,7 +134,6 @@ tui_set_layout (enum tui_layout_type layout_type)
 	    {
 	    case SRC_COMMAND:
 	      tui_set_win_focus_to (TUI_SRC_WIN);
-	      layout_def->display_mode = SRC_WIN;
 	      break;
 	    case DISASSEM_COMMAND:
 	      /* The previous layout was not showing code.
@@ -148,7 +146,6 @@ tui_set_layout (enum tui_layout_type layout_type)
 
 	      tui_get_begin_asm_address (&gdbarch, &addr);
 	      tui_set_win_focus_to (TUI_DISASM_WIN);
-	      layout_def->display_mode = DISASSEM_WIN;
 	      break;
 	    case SRC_DISASSEM_COMMAND:
 	      /* The previous layout was not showing code.
@@ -170,7 +167,6 @@ tui_set_layout (enum tui_layout_type layout_type)
 		tui_set_win_focus_to (TUI_SRC_WIN);
 	      else
 		tui_set_win_focus_to (TUI_DATA_WIN);
-	      layout_def->display_mode = SRC_WIN;
 	      break;
 	    case DISASSEM_DATA_COMMAND:
 	      /* The previous layout was not showing code.
@@ -186,7 +182,6 @@ tui_set_layout (enum tui_layout_type layout_type)
 		tui_set_win_focus_to (TUI_DISASM_WIN);
 	      else
 		tui_set_win_focus_to (TUI_DATA_WIN);
-	      layout_def->display_mode = DISASSEM_WIN;
 	      break;
 	    default:
 	      break;


                 reply	other threads:[~2019-08-13 20:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190813205334.66850.qmail@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).