aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-data.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-07-02 17:07:02 -0600
committerTom Tromey <tom@tromey.com>2019-07-17 12:19:25 -0600
commit5104fe361d818a46b262b5d504f3d293c9a2b44a (patch)
tree2e6677c74b037797ea5da459cc3f1a0d0099305b /gdb/tui/tui-data.c
parentdaa15dde7202d948da694bdfe0df9e5294c7ee9a (diff)
downloadgdb-5104fe361d818a46b262b5d504f3d293c9a2b44a.zip
gdb-5104fe361d818a46b262b5d504f3d293c9a2b44a.tar.gz
gdb-5104fe361d818a46b262b5d504f3d293c9a2b44a.tar.bz2
Move source window common to code to tui-winsource.[ch]
Like the previous rearranging patches, this moves the source and disassembly window base class code to tui-winsource.[ch]. The execution info window is also moved, because it is associated with this base class. gdb/ChangeLog 2019-07-17 Tom Tromey <tom@tromey.com> * tui/tui-winsource.h (struct tui_exec_info_window) (struct tui_source_window_base): Move from tui-data.h. * tui/tui-winsource.c: Move many method definitions from elsewhere. Remove "structuring" comments. * tui/tui-wingeneral.c (tui_source_window_base::make_visible) (tui_source_window_base::refresh_window): Move to tui-winsource.c. * tui/tui-win.c (tui_source_window_base::refresh_all) (tui_source_window_base::update_tab_width) (tui_source_window_base::set_new_height) (tui_source_window_base::do_make_visible_with_new_height): Move to tui-winsource.c. * tui/tui-source.h: Update. * tui/tui-source.c (tui_source_window_base::reset): Move to tui-winsource.c. * tui/tui-disasm.h: Update. * tui/tui-data.h (struct tui_exec_info_window): Move to tui-winsource.h. (struct tui_source_window_base): Likewise. * tui/tui-data.c (tui_source_window_base::clear_detail) (tui_source_window_base, ~tui_source_window_base): Move to tui-winsource.c.
Diffstat (limited to 'gdb/tui/tui-data.c')
-rw-r--r--gdb/tui/tui-data.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index 8977e8f..2748230 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -24,6 +24,7 @@
#include "tui/tui.h"
#include "tui/tui-data.h"
#include "tui/tui-wingeneral.h"
+#include "tui/tui-winsource.h"
#include "gdb_curses.h"
/****************************
@@ -139,17 +140,6 @@ tui_add_to_source_windows (struct tui_source_window_base *win_info)
source_windows.push_back (win_info);
}
-/* See tui-data.h. */
-
-void
-tui_source_window_base::clear_detail ()
-{
- gdbarch = NULL;
- start_line_or_addr.loa = LOA_ADDRESS;
- start_line_or_addr.u.addr = 0;
- horizontal_offset = 0;
-}
-
/* Accessor for the locator win info. Answers a pointer to the static
locator win info struct. */
struct tui_locator_window *
@@ -313,23 +303,8 @@ tui_win_info::tui_win_info (enum tui_win_type type)
{
}
-tui_source_window_base::tui_source_window_base (enum tui_win_type type)
- : tui_win_info (type),
- execution_info (new tui_exec_info_window ())
-{
- gdb_assert (type == SRC_WIN || type == DISASSEM_WIN);
- start_line_or_addr.loa = LOA_ADDRESS;
- start_line_or_addr.u.addr = 0;
-}
-
tui_gen_win_info::~tui_gen_win_info ()
{
tui_delete_win (handle);
xfree (title);
}
-
-tui_source_window_base::~tui_source_window_base ()
-{
- xfree (fullname);
- delete execution_info;
-}