diff options
author | Tom Tromey <tom@tromey.com> | 2019-07-12 18:18:10 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-08-16 14:17:36 -0600 |
commit | 398fdd6086a290748afcce0efabaebb4e363278c (patch) | |
tree | a661b12700f45fc6e8bf573ecffc91c10740f454 /gdb/tui/tui-winsource.c | |
parent | e699d33164a59dcfe7ad4a5154e5c6c811c1f958 (diff) | |
download | gdb-398fdd6086a290748afcce0efabaebb4e363278c.zip gdb-398fdd6086a290748afcce0efabaebb4e363278c.tar.gz gdb-398fdd6086a290748afcce0efabaebb4e363278c.tar.bz2 |
Remove the TUI execution info window
The TUI execution info window is unusual in that it is always linked
to a source or disassembly window. Even updates of its content are
handled by the source window, so it really has no life of its own.
This patch removes this window entirely and puts its functionality
directly into the source window. This simplifies the code somewhat.
This is a user-visible change, because now the box around the source
(or disassembly) window encloses the execution info as well. I
consider this an improvement as well, though.
Note that this patch caused ncurses to start emitting the "CSI Z"
sequence, so I've added this to the test suite terminal
implementation.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui.h (enum tui_win_type) <EXEC_INFO_WIN>: Remove.
* tui/tui-winsource.h (struct tui_exec_info_window): Remove.
(struct tui_source_window_base) <make_visible, refresh_window,
resize>: Remove methods.
<execution_info>: Remove field.
* tui/tui-winsource.c (tui_source_window_base::do_erase_source_content)
(tui_show_source_line, tui_source_window_base)
(~tui_source_window_base): Update.
(tui_source_window_base::resize)
(tui_source_window_base::make_visible)
(tui_source_window_base::refresh_window): Remove.
(tui_source_window_base::update_exec_info): Update.
* tui/tui-source.c (tui_source_window::set_contents): Update.
* tui/tui-disasm.c (tui_disasm_window::set_contents): Update.
gdb/testsuite/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* lib/tuiterm.exp (_csi_Z): New proc.
* gdb.tui/basic.exp: Update window positions.
* gdb.tui/empty.exp: Update window positions.
Diffstat (limited to 'gdb/tui/tui-winsource.c')
-rw-r--r-- | gdb/tui/tui-winsource.c | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 43e8a28..0a3eb78 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -206,9 +206,6 @@ tui_source_window_base::do_erase_source_content (const char *str) (char *) str); refresh_window (); - - werase (execution_info->handle); - execution_info->refresh_window (); } } @@ -224,7 +221,7 @@ tui_show_source_line (struct tui_source_window_base *win_info, int lineno) if (line->is_exec_point) tui_set_reverse_mode (win_info->handle, true); - wmove (win_info->handle, lineno, 1); + wmove (win_info->handle, lineno, TUI_EXECINFO_SIZE); tui_puts (line->line, win_info->handle); if (line->is_exec_point) @@ -268,8 +265,7 @@ tui_source_window_base::clear_detail () } tui_source_window_base::tui_source_window_base (enum tui_win_type type) - : tui_win_info (type), - execution_info (new tui_exec_info_window ()) + : tui_win_info (type) { gdb_assert (type == SRC_WIN || type == DISASSEM_WIN); start_line_or_addr.loa = LOA_ADDRESS; @@ -280,18 +276,8 @@ tui_source_window_base::tui_source_window_base (enum tui_win_type type) tui_source_window_base::~tui_source_window_base () { xfree (fullname); - delete execution_info; } -void -tui_source_window_base::resize (int height, int width, - int origin_x, int origin_y) -{ - tui_gen_win_info::resize (height, width - 3, - origin_x + 3, origin_y); - execution_info->resize (height, 3, origin_x, origin_y); -} - /* See tui-data.h. */ void @@ -351,24 +337,6 @@ tui_source_window_base::rerender () /* See tui-data.h. */ void -tui_source_window_base::make_visible (bool visible) -{ - execution_info->make_visible (visible); - tui_win_info::make_visible (visible); -} - -/* See tui-data.h. */ - -void -tui_source_window_base::refresh_window () -{ - execution_info->refresh_window (); - tui_win_info::refresh_window (); -} - -/* See tui-data.h. */ - -void tui_source_window_base::refill () { symtab *s = nullptr; @@ -521,7 +489,6 @@ tui_source_window_base::update_breakpoint_info void tui_source_window_base::update_exec_info () { - werase (execution_info->handle); update_breakpoint_info (nullptr, true); for (int i = 0; i < content.size (); i++) { @@ -544,7 +511,7 @@ tui_source_window_base::update_exec_info () if (src_element->is_exec_point) element[TUI_EXEC_POS] = '>'; - mvwaddstr (execution_info->handle, i + 1, 0, element); + mvwaddstr (handle, i + 1, 1, element); } - execution_info->refresh_window (); + refresh_window (); } |