Move TUI data item window to tui-regs.h
authorTom Tromey <tom@tromey.com>
Tue, 2 Jul 2019 21:51:00 +0000 (15:51 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 17 Jul 2019 18:19:23 +0000 (12:19 -0600)
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.

gdb/ChangeLog
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-regs.c
gdb/tui/tui-regs.h

index ae1577259a09d9ce673d8298afd530a36ca81d3d..5f413c987d6a53a8b46f2cfa981850949dd00f46 100644 (file)
@@ -1,3 +1,12 @@
+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.
index 5e755168827c8b85cf900a04e0c630254fb34cf9..8977e8fd59293a1b80d75bc6e0efc9c593633894 100644 (file)
@@ -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);
-}
index a847f2ada936f89c2cef94a58bca2a3bf6d632ee..e66adc1f29ab724b57549036387d7c49e4b78b09 100644 (file)
@@ -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
 {
index 2470478ce859c6e04ff6d7c019ec78a89bce6611..c13a5b15871caa73bd14b66159c2f71cad5a8d10 100644 (file)
@@ -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
index acefa41f99ee602efc9a126b0df6fb1af057e69d..064672991766cc98224169b6a0f372bb16aa9cbc 100644 (file)
 
 #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
 {
This page took 0.032115 seconds and 4 git commands to generate.