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 command from tui_which_element
Date: Tue, 25 Jun 2019 14:02:00 -0000	[thread overview]
Message-ID: <20190625140241.90441.qmail@sourceware.org> (raw)

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

commit dd835f8b70a2dfb4d8b84a4744606a9c922aeb25
Author: Tom Tromey <tom@tromey.com>
Date:   Fri Jun 21 06:16:06 2019 -0600

    Remove command from tui_which_element
    
    union tui_which_element has a "command" member, but it is never used.
    This removes it.
    
    gdb/ChangeLog
    2019-06-25  Tom Tromey  <tom@tromey.com>
    
    	* tui/tui-data.h (struct tui_command_element): Remove.
    	(union tui_which_element) <command>: Remove.
    	* tui/tui-data.c (init_content_element): Remove CMD_WIN case.  Add
    	assert.
    	(free_content_elements): Remove CMD_WIN case.

Diff:
---
 gdb/ChangeLog      | 8 ++++++++
 gdb/tui/tui-data.c | 7 +------
 gdb/tui/tui-data.h | 7 -------
 3 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b0e0547..9c6cf68 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
 2019-06-25  Tom Tromey  <tom@tromey.com>
 
+	* tui/tui-data.h (struct tui_command_element): Remove.
+	(union tui_which_element) <command>: Remove.
+	* tui/tui-data.c (init_content_element): Remove CMD_WIN case.  Add
+	assert.
+	(free_content_elements): Remove CMD_WIN case.
+
+2019-06-25  Tom Tromey  <tom@tromey.com>
+
 	* tui/tui-layout.c (tui_set_layout): Update.
 	* tui/tui-data.h (struct tui_layout_def) <split>: Remove.
 	* tui/tui-data.c (layout_def): Update.
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index 2c1e575..427f04a 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -366,6 +366,7 @@ init_content_element (struct tui_win_element *element,
 {
   gdb_assert (type != EXEC_INFO_WIN);
   gdb_assert (type != LOCATOR_WIN);
+  gdb_assert (type != CMD_WIN);
 
   switch (type)
     {
@@ -383,9 +384,6 @@ init_content_element (struct tui_win_element *element,
 	tui_alloc_content (1, DATA_ITEM_WIN);
       element->which_element.data_window->content_size = 1;
       break;
-    case CMD_WIN:
-      element->which_element.command.line = NULL;
-      break;
     case DATA_ITEM_WIN:
       element->which_element.data.name = NULL;
       element->which_element.data.type = TUI_REGISTER;
@@ -627,9 +625,6 @@ free_content_elements (tui_win_content content,
                       xfree (element->which_element.data.content);
 		      xfree (element);
 		      break;
-		    case CMD_WIN:
-		      xfree (element->which_element.command.line);
-		      break;
 		    default:
 		      break;
 		    }
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 0990a2d..5c1f2bd 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -201,12 +201,6 @@ struct tui_data_element
 };
 
 
-/* Elements in the command window content.  */
-struct tui_command_element
-{
-  char *line;
-};
-
 #ifdef PATH_MAX
 # define MAX_LOCATOR_ELEMENT_LEN        PATH_MAX
 #else
@@ -234,7 +228,6 @@ union tui_which_element
   struct tui_source_element source;	/* The source elements.  */
   struct tui_gen_win_info *data_window;	/* Data display elements.  */
   struct tui_data_element data;		/* Elements of data_window.  */
-  struct tui_command_element command;	/* Command elements.  */
 };
 
 struct tui_win_element


                 reply	other threads:[~2019-06-25 14:02 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=20190625140241.90441.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).