[57/61] Move tui_source_window to tui-source.h

Message ID 20190704170311.15982-58-tom@tromey.com
State New
Headers show
Series
  • More TUI refactorings
Related show

Commit Message

Tom Tromey July 4, 2019, 5:03 p.m.
This moves tui_source_window to tui-source.h.  In this case there were
no method definitions to be moved.

2019-07-04  Tom Tromey  <tom@tromey.com>

	* tui/tui.c: Update.
	* tui/tui-source.h (struct tui_source_window): Move from
	tui-data.h.
	* tui/tui-layout.c: Update.
	* tui/tui-disasm.c: Update.
	* tui/tui-data.h (struct tui_source_window): Move to
	tui-source.h.
---
 gdb/ChangeLog        | 10 ++++++++++
 gdb/tui/tui-data.h   | 31 +------------------------------
 gdb/tui/tui-disasm.c |  1 +
 gdb/tui/tui-layout.c |  1 +
 gdb/tui/tui-source.h | 31 ++++++++++++++++++++++++++++++-
 gdb/tui/tui.c        |  1 +
 6 files changed, 44 insertions(+), 31 deletions(-)

-- 
2.17.2

Patch

diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 3446d51b8dc..0d984ad3b4c 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -27,6 +27,7 @@ 
 #include "observable.h"
 
 struct tui_cmd_window;
+struct tui_source_window;
 
 /* This is a point definition.  */
 struct tui_point
@@ -382,36 +383,6 @@  public:
   std::vector<tui_source_element> content;
 };
 
-/* A TUI source window.  */
-
-struct tui_source_window : public tui_source_window_base
-{
-  tui_source_window ();
-  ~tui_source_window ();
-
-  DISABLE_COPY_AND_ASSIGN (tui_source_window);
-
-  const char *name () const override
-  {
-    return SRC_NAME;
-  }
-
-  bool location_matches_p (struct bp_location *loc, int line_no) override;
-
-  bool showing_source_p (const char *filename) const;
-
-protected:
-
-  void do_scroll_vertical (int num_to_scroll) override;
-
-private:
-
-  void style_changed ();
-
-  /* A token used to register and unregister an observer.  */
-  gdb::observers::token m_observable;
-};
-
 extern int tui_win_is_auxiliary (enum tui_win_type win_type);
 
 
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index a644c287cab..effe8e74528 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -35,6 +35,7 @@ 
 #include "tui/tui-stack.h"
 #include "tui/tui-file.h"
 #include "tui/tui-disasm.h"
+#include "tui/tui-source.h"
 #include "progspace.h"
 #include "objfiles.h"
 
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index 2e67ed15238..a5709c595f3 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -37,6 +37,7 @@ 
 #include "tui/tui-winsource.h"
 #include "tui/tui-disasm.h"
 #include "tui/tui-layout.h"
+#include "tui/tui-source.h"
 #include "gdb_curses.h"
 
 /*******************************
diff --git a/gdb/tui/tui-source.h b/gdb/tui/tui-source.h
index fc129ab8f26..6faaa2e9e0f 100644
--- a/gdb/tui/tui-source.h
+++ b/gdb/tui/tui-source.h
@@ -25,7 +25,36 @@ 
 #include "tui/tui-data.h"
 
 struct symtab;
-struct tui_win_info;
+
+/* A TUI source window.  */
+
+struct tui_source_window : public tui_source_window_base
+{
+  tui_source_window ();
+  ~tui_source_window ();
+
+  DISABLE_COPY_AND_ASSIGN (tui_source_window);
+
+  const char *name () const override
+  {
+    return SRC_NAME;
+  }
+
+  bool location_matches_p (struct bp_location *loc, int line_no) override;
+
+  bool showing_source_p (const char *filename) const;
+
+protected:
+
+  void do_scroll_vertical (int num_to_scroll) override;
+
+private:
+
+  void style_changed ();
+
+  /* A token used to register and unregister an observer.  */
+  gdb::observers::token m_observable;
+};
 
 extern enum tui_status tui_set_source_content (tui_source_window_base *,
 					       struct symtab *, 
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 22de9a70b82..b15eb32af5e 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -31,6 +31,7 @@ 
 #include "tui/tui-stack.h"
 #include "tui/tui-win.h"
 #include "tui/tui-winsource.h"
+#include "tui/tui-source.h"
 #include "target.h"
 #include "frame.h"
 #include "breakpoint.h"