Rearrange TUI data window code
authorTom Tromey <tom@tromey.com>
Tue, 2 Jul 2019 21:41:08 +0000 (15:41 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 17 Jul 2019 18:19:21 +0000 (12:19 -0600)
An earlier patch caused tui-windata.h to be essentially empty.  And,
other earlier patches implemented TUI data window methods in any spot
that happened to be convenient at the time.

This patch rearranges all the data window code to be somewhat more
organized.  It moves tui_data_window to tui-regs.h, and moves the
implementation of all methods to tui-regs.c.  It then removes
tui-windata.h and tui-windata.c.

It also removes the "structuring" comments from tui-regs.c; these are
not the usual gdb style, and were out of date anyhow.  Finally, it
moves _initialize_tui_regs to the end of the file, per the usual gdb
convention.

gdb/ChangeLog
2019-07-17  Tom Tromey  <tom@tromey.com>

* tui/tui.c: Update.
* tui/tui-wingeneral.c (tui_data_window::refresh_window): Move to
tui-regs.c.
* tui/tui-windata.h: Remove file.
* tui/tui-windata.c: Remove file.
* tui/tui-win.c (tui_data_window::set_new_height)
(tui_data_window::do_make_visible_with_new_height): Move to
tui-regs.c.
* tui/tui-regs.h (struct tui_data_window): Move from tui-data.h.
* tui/tui-regs.c: Remove "structuring" comments.
(tui_data_window::first_data_item_displayed)
(tui_data_window::delete_data_content_windows)
(tui_data_window::erase_data_content)
(tui_data_window::display_all_data)
(tui_data_window::refresh_all)
(tui_data_window::do_scroll_vertical)
(tui_data_window::clear_detail, tui_data_window::set_new_height)
(tui_data_window::do_make_visible_with_new_height)
(tui_data_window::refresh_window): Move from elsewhere.
(_initialize_tui_regs): Move to end of file.
* tui/tui-layout.c: Update.
* tui/tui-hooks.c: Update.
* tui/tui-data.h (struct tui_data_window): Move to tui-regs.h.
* tui/tui-data.c (tui_data_window::clear_detail): Move to
tui-regs.c.
* Makefile.in (SUBDIR_TUI_SRCS): Remove tui-windata.c.

13 files changed:
gdb/ChangeLog
gdb/Makefile.in
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-hooks.c
gdb/tui/tui-layout.c
gdb/tui/tui-regs.c
gdb/tui/tui-regs.h
gdb/tui/tui-win.c
gdb/tui/tui-windata.c [deleted file]
gdb/tui/tui-windata.h [deleted file]
gdb/tui/tui-wingeneral.c
gdb/tui/tui.c

index 4890f6f351071ddc1307d9a3cead3a9db395791e..8ccadef28612429ddf1a74da836074fe2c52974b 100644 (file)
@@ -1,3 +1,32 @@
+2019-07-17  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui.c: Update.
+       * tui/tui-wingeneral.c (tui_data_window::refresh_window): Move to
+       tui-regs.c.
+       * tui/tui-windata.h: Remove file.
+       * tui/tui-windata.c: Remove file.
+       * tui/tui-win.c (tui_data_window::set_new_height)
+       (tui_data_window::do_make_visible_with_new_height): Move to
+       tui-regs.c.
+       * tui/tui-regs.h (struct tui_data_window): Move from tui-data.h.
+       * tui/tui-regs.c: Remove "structuring" comments.
+       (tui_data_window::first_data_item_displayed)
+       (tui_data_window::delete_data_content_windows)
+       (tui_data_window::erase_data_content)
+       (tui_data_window::display_all_data)
+       (tui_data_window::refresh_all)
+       (tui_data_window::do_scroll_vertical)
+       (tui_data_window::clear_detail, tui_data_window::set_new_height)
+       (tui_data_window::do_make_visible_with_new_height)
+       (tui_data_window::refresh_window): Move from elsewhere.
+       (_initialize_tui_regs): Move to end of file.
+       * tui/tui-layout.c: Update.
+       * tui/tui-hooks.c: Update.
+       * tui/tui-data.h (struct tui_data_window): Move to tui-regs.h.
+       * tui/tui-data.c (tui_data_window::clear_detail): Move to
+       tui-regs.c.
+       * Makefile.in (SUBDIR_TUI_SRCS): Remove tui-windata.c.
+
 2019-07-17  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-io.c (tui_puts_internal): Call wrefresh if newline is
index b6680b9afd3d50b5165fb577ca94a4ae8e3373e1..75936539720bf58f3f4e5c23046d0f86428c985e 100644 (file)
@@ -291,7 +291,6 @@ SUBDIR_TUI_SRCS = \
        tui/tui-source.c \
        tui/tui-stack.c \
        tui/tui-win.c \
-       tui/tui-windata.c \
        tui/tui-wingeneral.c \
        tui/tui-winsource.c
 
index ee5b3aa3a7a8ae8c30da3d6017b7e8cf16415e9c..e861eb222ddc04cb552f76df689fd6a4a6675eb2 100644 (file)
@@ -158,16 +158,6 @@ tui_cmd_window::clear_detail ()
   wmove (handle, 0, 0);
 }
 
-/* See tui-data.h.  */
-
-void
-tui_data_window::clear_detail ()
-{
-  regs_content.clear ();
-  regs_column_count = 1;
-  display_regs = false;
-}
-
 /* Accessor for the locator win info.  Answers a pointer to the static
    locator win info struct.  */
 struct tui_locator_window *
index cfe24609b8905ac13dbc194dd0aec895dddb39ce..ec60efda7a5359c457b7c2502219958c572af0d8 100644 (file)
@@ -454,87 +454,6 @@ protected:
   void do_scroll_vertical (int num_to_scroll) override;
 };
 
-struct tui_data_window : public tui_win_info
-{
-  tui_data_window ()
-    : tui_win_info (DATA_WIN)
-  {
-  }
-
-  DISABLE_COPY_AND_ASSIGN (tui_data_window);
-
-  void clear_detail () override;
-  void refresh_all () override;
-
-  void set_new_height (int height) override;
-
-  void refresh_window () override;
-
-  const char *name () const override
-  {
-    return DATA_NAME;
-  }
-
-  /* Windows that are used to display registers.  */
-  std::vector<std::unique_ptr<tui_data_item_window>> regs_content;
-  int regs_column_count = 0;
-  /* Should regs be displayed at all?  */
-  bool display_regs = false;
-  struct reggroup *current_group = nullptr;
-
-  /* Answer the number of the last line in the regs display.  If there
-     are no registers (-1) is returned.  */
-  int last_regs_line_no () const;
-
-  /* Answer the line number that the register element at element_no is
-     on.  If element_no is greater than the number of register
-     elements there are, -1 is returned.  */
-  int line_from_reg_element_no (int element_no) const;
-
-  /* Answer the index of the first element in line_no.  If line_no is
-     past the register area (-1) is returned.  */
-  int first_reg_element_no_inline (int line_no) const;
-
-  /* Displays the data that is in the data window's content.  It does
-     not set the content.  */
-  void display_all_data ();
-
-  /* Delete all the item windows in the data window.  This is usually
-     done when the data window is scrolled.  */
-  void delete_data_content_windows ();
-
-  void erase_data_content (const char *prompt);
-
-  /* Display the registers in the content from 'start_element_no'
-     until the end of the register content or the end of the display
-     height.  No checking for displaying past the end of the registers
-     is done here.  */
-  void display_registers_from (int start_element_no);
-
-  /* Display the registers starting at line line_no in the data
-     window.  Answers the line number that the display actually
-     started from.  If nothing is displayed (-1) is returned.  */
-  int display_registers_from_line (int line_no);
-
-protected:
-
-  void do_scroll_vertical (int num_to_scroll) override;
-  void do_scroll_horizontal (int num_to_scroll) override
-  {
-  }
-  void do_make_visible_with_new_height () override;
-
-  /* Return the index of the first element displayed.  If none are
-     displayed, then return -1.  */
-  int first_data_item_displayed ();
-
-  /* Display the registers in the content from 'start_element_no' on
-     'start_line_no' until the end of the register content or the end
-     of the display height.  This function checks that we won't
-     display off the end of the register display.  */
-  void display_reg_element_at_line (int start_element_no, int start_line_no);
-};
-
 struct tui_cmd_window : public tui_win_info
 {
   tui_cmd_window ()
index 84acd3ac2e6bf6a582159ef33935727455995009..a2d06f8a15242c874c0ac4479ac0c991050842ac 100644 (file)
@@ -45,7 +45,6 @@
 #include "tui/tui-regs.h"
 #include "tui/tui-win.h"
 #include "tui/tui-stack.h"
-#include "tui/tui-windata.h"
 #include "tui/tui-winsource.h"
 
 #include "gdb_curses.h"
index 4869cd9a11a69b9975da1420f1cbc66fe40074e8..abc3fd6018293d3d76e247fe6eba9482ac505d07 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "tui/tui.h"
 #include "tui/tui-data.h"
-#include "tui/tui-windata.h"
 #include "tui/tui-wingeneral.h"
 #include "tui/tui-stack.h"
 #include "tui/tui-regs.h"
index 52f67026b549043e76f1b346f111729c53461795..2470478ce859c6e04ff6d7c019ec78a89bce6611 100644 (file)
@@ -32,7 +32,6 @@
 #include "target.h"
 #include "tui/tui-layout.h"
 #include "tui/tui-win.h"
-#include "tui/tui-windata.h"
 #include "tui/tui-wingeneral.h"
 #include "tui/tui-file.h"
 #include "tui/tui-regs.h"
 
 #include "gdb_curses.h"
 
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS    **
-******************************************/
 static void tui_display_register (struct tui_data_item_window *data);
 
 static void tui_show_register_group (tui_data_window *win_info,
@@ -58,13 +53,7 @@ static void tui_get_register (struct frame_info *frame,
                              struct tui_data_item_window *data,
                              int regnum, bool *changedp);
 
-
-
-/*****************************************
-** PUBLIC FUNCTIONS                     **
-******************************************/
-
-/* See tui-data.h.  */
+/* See tui-regs.h.  */
 
 int
 tui_data_window::last_regs_line_no () const
@@ -80,7 +69,7 @@ tui_data_window::last_regs_line_no () const
   return num_lines;
 }
 
-/* See tui-data.h.  */
+/* See tui-regs.h.  */
 
 int
 tui_data_window::line_from_reg_element_no (int element_no) const
@@ -104,7 +93,7 @@ tui_data_window::line_from_reg_element_no (int element_no) const
     return (-1);
 }
 
-/* See tui-data.h.  */
+/* See tui-regs.h.  */
 
 int
 tui_data_window::first_reg_element_no_inline (int line_no) const
@@ -255,7 +244,7 @@ tui_show_register_group (tui_data_window *win_info,
     }
 }
 
-/* See tui-data.h.  */
+/* See tui-regs.h.  */
 
 void
 tui_data_window::display_registers_from (int start_element_no)
@@ -337,7 +326,7 @@ tui_data_window::display_registers_from (int start_element_no)
     }
 }
 
-/* See tui-data.h.  */
+/* See tui-regs.h.  */
 
 void
 tui_data_window::display_reg_element_at_line (int start_element_no,
@@ -366,7 +355,7 @@ tui_data_window::display_reg_element_at_line (int start_element_no,
     }
 }
 
-/* See tui-data.h.  */
+/* See tui-regs.h.  */
 
 int
 tui_data_window::display_registers_from_line (int line_no)
@@ -403,6 +392,167 @@ tui_data_window::display_registers_from_line (int line_no)
 }
 
 
+/* Answer the index first element displayed.  If none are displayed,
+   then return (-1).  */
+int
+tui_data_window::first_data_item_displayed ()
+{
+  for (int i = 0; i < regs_content.size (); i++)
+    {
+      struct tui_gen_win_info *data_item_win;
+
+      data_item_win = regs_content[i].get ();
+      if (data_item_win->handle != NULL && data_item_win->is_visible)
+       return i;
+    }
+
+  return -1;
+}
+
+/* See tui-regs.h.  */
+
+void
+tui_data_window::delete_data_content_windows ()
+{
+  for (auto &&win : regs_content)
+    {
+      tui_delete_win (win->handle);
+      win->handle = NULL;
+      win->is_visible = false;
+    }
+}
+
+
+void
+tui_data_window::erase_data_content (const char *prompt)
+{
+  werase (handle);
+  tui_check_and_display_highlight_if_needed (this);
+  if (prompt != NULL)
+    {
+      int half_width = (width - 2) / 2;
+      int x_pos;
+
+      if (strlen (prompt) >= half_width)
+       x_pos = 1;
+      else
+       x_pos = half_width - strlen (prompt);
+      mvwaddstr (handle, (height / 2), x_pos, (char *) prompt);
+    }
+  wrefresh (handle);
+}
+
+/* See tui-regs.h.  */
+
+void
+tui_data_window::display_all_data ()
+{
+  if (regs_content.empty ())
+    erase_data_content (NO_DATA_STRING);
+  else
+    {
+      erase_data_content (NULL);
+      delete_data_content_windows ();
+      tui_check_and_display_highlight_if_needed (this);
+      display_registers_from (0);
+    }
+}
+
+
+/* Function to redisplay the contents of the data window.  */
+void
+tui_data_window::refresh_all ()
+{
+  erase_data_content (NULL);
+  if (!regs_content.empty ())
+    {
+      int first_element = first_data_item_displayed ();
+
+      if (first_element >= 0)  /* Re-use existing windows.  */
+       {
+         int first_line = (-1);
+
+         if (first_element < regs_content.size ())
+           first_line = line_from_reg_element_no (first_element);
+
+         if (first_line >= 0)
+           {
+             erase_data_content (NULL);
+             display_registers_from_line (first_line);
+           }
+       }
+    }
+}
+
+
+/* Scroll the data window vertically forward or backward.  */
+void
+tui_data_window::do_scroll_vertical (int num_to_scroll)
+{
+  int first_element_no;
+  int first_line = (-1);
+
+  first_element_no = first_data_item_displayed ();
+  if (first_element_no < regs_content.size ())
+    first_line = line_from_reg_element_no (first_element_no);
+  else
+    { /* Calculate the first line from the element number which is in
+        the general data content.  */
+    }
+
+  if (first_line >= 0)
+    {
+      first_line += num_to_scroll;
+      erase_data_content (NULL);
+      delete_data_content_windows ();
+      display_registers_from_line (first_line);
+    }
+}
+
+/* See tui-regs.h.  */
+
+void
+tui_data_window::clear_detail ()
+{
+  regs_content.clear ();
+  regs_column_count = 1;
+  display_regs = false;
+}
+
+/* See tui-regs.h.  */
+
+void
+tui_data_window::set_new_height (int height)
+{
+  /* Delete all data item windows.  */
+  for (auto &&win : regs_content)
+    {
+      tui_delete_win (win->handle);
+      win->handle = NULL;
+    }
+}
+
+/* See tui-regs.h.  */
+
+void
+tui_data_window::do_make_visible_with_new_height ()
+{
+  display_all_data ();
+}
+
+/* See tui-regs.h.  */
+
+void
+tui_data_window::refresh_window ()
+{
+  tui_gen_win_info::refresh_window ();
+  for (auto &&win : regs_content)
+    {
+      if (win != NULL)
+       win->refresh_window ();
+    }
+}
+
 /* This function check all displayed registers for changes in values,
    given a particular frame.  If the values have changed, they are
    updated with the new value and highlighted.  */
@@ -600,23 +750,6 @@ tui_reggroup_completer (struct cmd_list_element *ignore,
     }
 }
 
-void
-_initialize_tui_regs (void)
-{
-  struct cmd_list_element **tuicmd, *cmd;
-
-  tuicmd = tui_get_cmd_list ();
-
-  cmd = add_cmd ("reg", class_tui, tui_reg_command, _("\
-TUI command to control the register window."), tuicmd);
-  set_cmd_completer (cmd, tui_reggroup_completer);
-}
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS                 **
-******************************************/
-
 /* Get the register from the frame and return a printable
    representation of it.  */
 
@@ -666,3 +799,15 @@ tui_get_register (struct frame_info *frame,
       xfree (prev_content);
     }
 }
+
+void
+_initialize_tui_regs (void)
+{
+  struct cmd_list_element **tuicmd, *cmd;
+
+  tuicmd = tui_get_cmd_list ();
+
+  cmd = add_cmd ("reg", class_tui, tui_reg_command, _("\
+TUI command to control the register window."), tuicmd);
+  set_cmd_completer (cmd, tui_reggroup_completer);
+}
index 354605c96f2fb9e26aba53bafcdc97589eac3794..acefa41f99ee602efc9a126b0df6fb1af057e69d 100644 (file)
 #ifndef TUI_TUI_REGS_H
 #define TUI_TUI_REGS_H
 
-#include "tui/tui-data.h"  /* For struct tui_register_display_type.  */
+#include "tui/tui-data.h"
+
+/* The TUI registers window.  */
+struct tui_data_window : public tui_win_info
+{
+  tui_data_window ()
+    : tui_win_info (DATA_WIN)
+  {
+  }
+
+  DISABLE_COPY_AND_ASSIGN (tui_data_window);
+
+  void clear_detail () override;
+  void refresh_all () override;
+
+  void set_new_height (int height) override;
+
+  void refresh_window () override;
+
+  const char *name () const override
+  {
+    return DATA_NAME;
+  }
+
+  /* Windows that are used to display registers.  */
+  std::vector<std::unique_ptr<tui_data_item_window>> regs_content;
+  int regs_column_count = 0;
+  /* Should regs be displayed at all?  */
+  bool display_regs = false;
+  struct reggroup *current_group = nullptr;
+
+  /* Answer the number of the last line in the regs display.  If there
+     are no registers (-1) is returned.  */
+  int last_regs_line_no () const;
+
+  /* Answer the line number that the register element at element_no is
+     on.  If element_no is greater than the number of register
+     elements there are, -1 is returned.  */
+  int line_from_reg_element_no (int element_no) const;
+
+  /* Answer the index of the first element in line_no.  If line_no is
+     past the register area (-1) is returned.  */
+  int first_reg_element_no_inline (int line_no) const;
+
+  /* Displays the data that is in the data window's content.  It does
+     not set the content.  */
+  void display_all_data ();
+
+  /* Delete all the item windows in the data window.  This is usually
+     done when the data window is scrolled.  */
+  void delete_data_content_windows ();
+
+  void erase_data_content (const char *prompt);
+
+  /* Display the registers in the content from 'start_element_no'
+     until the end of the register content or the end of the display
+     height.  No checking for displaying past the end of the registers
+     is done here.  */
+  void display_registers_from (int start_element_no);
+
+  /* Display the registers starting at line line_no in the data
+     window.  Answers the line number that the display actually
+     started from.  If nothing is displayed (-1) is returned.  */
+  int display_registers_from_line (int line_no);
+
+protected:
+
+  void do_scroll_vertical (int num_to_scroll) override;
+  void do_scroll_horizontal (int num_to_scroll) override
+  {
+  }
+  void do_make_visible_with_new_height () override;
+
+  /* Return the index of the first element displayed.  If none are
+     displayed, then return -1.  */
+  int first_data_item_displayed ();
+
+  /* Display the registers in the content from 'start_element_no' on
+     'start_line_no' until the end of the register content or the end
+     of the display height.  This function checks that we won't
+     display off the end of the register display.  */
+  void display_reg_element_at_line (int start_element_no, int start_line_no);
+};
 
 extern void tui_check_register_values (struct frame_info *);
 extern void tui_show_registers (struct reggroup *group);
index 2fb757a6a4dacfeada087cb87db03fb33a7415e5..0c7042e9385b911160b956c4a26443b8440d9701 100644 (file)
@@ -43,7 +43,6 @@
 #include "tui/tui-disasm.h"
 #include "tui/tui-source.h"
 #include "tui/tui-winsource.h"
-#include "tui/tui-windata.h"
 #include "tui/tui-win.h"
 
 #include "gdb_curses.h"
@@ -1243,19 +1242,6 @@ tui_source_window_base::set_new_height (int height)
     }
 }
 
-/* See tui-data.h.  */
-
-void
-tui_data_window::set_new_height (int height)
-{
-  /* Delete all data item windows.  */
-  for (auto &&win : regs_content)
-    {
-      tui_delete_win (win->handle);
-      win->handle = NULL;
-    }
-}
-
 /* Function make the target window (and auxiliary windows associated
    with the targer) invisible, and set the new height and
    location.  */
@@ -1333,14 +1319,6 @@ tui_source_window_base::do_make_visible_with_new_height ()
 
 /* See tui-data.h.  */
 
-void
-tui_data_window::do_make_visible_with_new_height ()
-{
-  display_all_data ();
-}
-
-/* See tui-data.h.  */
-
 void
 tui_cmd_window::do_make_visible_with_new_height ()
 {
diff --git a/gdb/tui/tui-windata.c b/gdb/tui/tui-windata.c
deleted file mode 100644 (file)
index 2ee259e..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-/* Data/register window display.
-
-   Copyright (C) 1998-2019 Free Software Foundation, Inc.
-
-   Contributed by Hewlett-Packard Company.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include "defs.h"
-#include "tui/tui.h"
-#include "tui/tui-data.h"
-#include "tui/tui-wingeneral.h"
-#include "tui/tui-regs.h"
-#include "tui/tui-windata.h"
-#include "gdb_curses.h"
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS    **
-******************************************/
-
-
-
-/*****************************************
-** PUBLIC FUNCTIONS                        **
-******************************************/
-
-
-/* Answer the index first element displayed.  If none are displayed,
-   then return (-1).  */
-int
-tui_data_window::first_data_item_displayed ()
-{
-  for (int i = 0; i < regs_content.size (); i++)
-    {
-      struct tui_gen_win_info *data_item_win;
-
-      data_item_win = regs_content[i].get ();
-      if (data_item_win->handle != NULL && data_item_win->is_visible)
-       return i;
-    }
-
-  return -1;
-}
-
-/* See tui-data.h.  */
-
-void
-tui_data_window::delete_data_content_windows ()
-{
-  for (auto &&win : regs_content)
-    {
-      tui_delete_win (win->handle);
-      win->handle = NULL;
-      win->is_visible = false;
-    }
-}
-
-
-void
-tui_data_window::erase_data_content (const char *prompt)
-{
-  werase (handle);
-  tui_check_and_display_highlight_if_needed (this);
-  if (prompt != NULL)
-    {
-      int half_width = (width - 2) / 2;
-      int x_pos;
-
-      if (strlen (prompt) >= half_width)
-       x_pos = 1;
-      else
-       x_pos = half_width - strlen (prompt);
-      mvwaddstr (handle, (height / 2), x_pos, (char *) prompt);
-    }
-  wrefresh (handle);
-}
-
-/* See tui-data.h.  */
-
-void
-tui_data_window::display_all_data ()
-{
-  if (regs_content.empty ())
-    erase_data_content (NO_DATA_STRING);
-  else
-    {
-      erase_data_content (NULL);
-      delete_data_content_windows ();
-      tui_check_and_display_highlight_if_needed (this);
-      display_registers_from (0);
-    }
-}
-
-
-/* Function to redisplay the contents of the data window.  */
-void
-tui_data_window::refresh_all ()
-{
-  erase_data_content (NULL);
-  if (!regs_content.empty ())
-    {
-      int first_element = first_data_item_displayed ();
-
-      if (first_element >= 0)  /* Re-use existing windows.  */
-       {
-         int first_line = (-1);
-
-         if (first_element < regs_content.size ())
-           first_line = line_from_reg_element_no (first_element);
-
-         if (first_line >= 0)
-           {
-             erase_data_content (NULL);
-             display_registers_from_line (first_line);
-           }
-       }
-    }
-}
-
-
-/* Scroll the data window vertically forward or backward.  */
-void
-tui_data_window::do_scroll_vertical (int num_to_scroll)
-{
-  int first_element_no;
-  int first_line = (-1);
-
-  first_element_no = first_data_item_displayed ();
-  if (first_element_no < regs_content.size ())
-    first_line = line_from_reg_element_no (first_element_no);
-  else
-    { /* Calculate the first line from the element number which is in
-        the general data content.  */
-    }
-
-  if (first_line >= 0)
-    {
-      first_line += num_to_scroll;
-      erase_data_content (NULL);
-      delete_data_content_windows ();
-      display_registers_from_line (first_line);
-    }
-}
-
-
-/*****************************************
-** STATIC LOCAL FUNCTIONS               **
-******************************************/
diff --git a/gdb/tui/tui-windata.h b/gdb/tui/tui-windata.h
deleted file mode 100644 (file)
index 3b89eef..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Data/register window display.
-
-   Copyright (C) 1998-2019 Free Software Foundation, Inc.
-
-   Contributed by Hewlett-Packard Company.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef TUI_TUI_WINDATA_H
-#define TUI_TUI_WINDATA_H
-
-#include "tui/tui-data.h"
-
-#endif /* TUI_TUI_WINDATA_H */
index 2fb8d6c684f164f76f84083c3af2d0473b32ee60..5d632b6f97e1e62d98fa935ba5932042be13ae41 100644 (file)
@@ -43,19 +43,6 @@ tui_gen_win_info::refresh_window ()
     }
 }
 
-/* See tui-data.h.  */
-
-void
-tui_data_window::refresh_window ()
-{
-  tui_gen_win_info::refresh_window ();
-  for (auto &&win : regs_content)
-    {
-      if (win != NULL)
-       win->refresh_window ();
-    }
-}
-
 /* Function to delete the curses window, checking for NULL.  */
 void
 tui_delete_win (WINDOW *window)
index ee2c35587df6cc2da2b7e1794e24c4e7ee06671a..996dbaf6cf7d3c8a4d1c8a915c5e137329890d04 100644 (file)
@@ -30,7 +30,6 @@
 #include "tui/tui-stack.h"
 #include "tui/tui-win.h"
 #include "tui/tui-winsource.h"
-#include "tui/tui-windata.h"
 #include "target.h"
 #include "frame.h"
 #include "breakpoint.h"
This page took 0.041802 seconds and 4 git commands to generate.