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] Move TUI data item window to tui-regs.h
Date: Wed, 17 Jul 2019 18:41:00 -0000	[thread overview]
Message-ID: <20190717184109.91694.qmail@sourceware.org> (raw)

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

commit 96bd6233af7c01885de4f4de3a4016014d61d859
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Jul 2 15:51:00 2019 -0600

    Move TUI data item window to tui-regs.h
    
    The TUI data item window is only used by the TUI register window.  So,
    this patch moves the relevant code to tui-regs.[ch].
    
    gdb/ChangeLog
    2019-07-17  Tom Tromey  <tom@tromey.com>
    
    	* tui/tui-regs.h (struct tui_data_item_window): Move from
    	tui-data.h.
    	* tui/tui-regs.c (tui_data_item_window): Move from tui-data.c.
    	* tui/tui-data.h (struct tui_data_item_window): Move to
    	tui-regs.h.
    	* tui/tui-data.c (~tui_data_item_window): Move to tui-regs.c.

Diff:
---
 gdb/ChangeLog      |  9 +++++++++
 gdb/tui/tui-data.c | 11 -----------
 gdb/tui/tui-data.h | 19 -------------------
 gdb/tui/tui-regs.c |  9 +++++++++
 gdb/tui/tui-regs.h | 19 +++++++++++++++++++
 5 files changed, 37 insertions(+), 30 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ae15772..5f413c9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
 2019-07-17  Tom Tromey  <tom@tromey.com>
 
+	* tui/tui-regs.h (struct tui_data_item_window): Move from
+	tui-data.h.
+	* tui/tui-regs.c (tui_data_item_window): Move from tui-data.c.
+	* tui/tui-data.h (struct tui_data_item_window): Move to
+	tui-regs.h.
+	* tui/tui-data.c (~tui_data_item_window): Move to tui-regs.c.
+
+2019-07-17  Tom Tromey  <tom@tromey.com>
+
 	* tui/tui.c: Update.
 	* tui/tui-win.c (tui_cmd_window::do_make_visible_with_new_height)
 	(tui_cmd_window::max_height): Move to tui-command.c.
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index 5e75516..8977e8f 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -333,14 +333,3 @@ tui_source_window_base::~tui_source_window_base ()
   xfree (fullname);
   delete execution_info;
 }  
-
-/**********************************
-** LOCAL STATIC FUNCTIONS        **
-**********************************/
-
-
-tui_data_item_window::~tui_data_item_window ()
-{
-  xfree (value);
-  xfree (content);
-}
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index a847f2a..e66adc1 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -249,25 +249,6 @@ struct tui_locator_window : public tui_gen_win_info
   struct gdbarch *gdbarch = nullptr;
 };
 
-/* A data item window.  */
-
-struct tui_data_item_window : public tui_gen_win_info
-{
-  tui_data_item_window ()
-    : tui_gen_win_info (DATA_ITEM_WIN)
-  {
-  }
-
-  ~tui_data_item_window () override;
-
-  const char *name = nullptr;
-  /* The register number, or data display number.  */
-  int item_no = -1;
-  void *value = nullptr;
-  bool highlight = false;
-  char *content = nullptr;
-};
-
 /* This defines information about each logical window.  */
 struct tui_win_info : public tui_gen_win_info
 {
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 2470478..c13a5b1 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -53,6 +53,15 @@ static void tui_get_register (struct frame_info *frame,
 			      struct tui_data_item_window *data,
 			      int regnum, bool *changedp);
 
+
+/* See tui-regs.h.  */
+
+tui_data_item_window::~tui_data_item_window ()
+{
+  xfree (value);
+  xfree (content);
+}
+
 /* See tui-regs.h.  */
 
 int
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index acefa41..0646729 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -24,6 +24,25 @@
 
 #include "tui/tui-data.h"
 
+/* A data item window.  */
+
+struct tui_data_item_window : public tui_gen_win_info
+{
+  tui_data_item_window ()
+    : tui_gen_win_info (DATA_ITEM_WIN)
+  {
+  }
+
+  ~tui_data_item_window () override;
+
+  const char *name = nullptr;
+  /* The register number, or data display number.  */
+  int item_no = -1;
+  void *value = nullptr;
+  bool highlight = false;
+  char *content = nullptr;
+};
+
 /* The TUI registers window.  */
 struct tui_data_window : public tui_win_info
 {


                 reply	other threads:[~2019-07-17 18:41 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=20190717184109.91694.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).