Age | Commit message (Collapse) | Author | Files | Lines |
|
A couple of spots in tui-layout.c still call the show_source_content
method. However, now that re-rendering is done by the resize method,
these calls are no longer needed.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-layout.c (show_source_disasm_command)
(show_source_or_disasm_and_command): Don't call
show_source_content.
|
|
This changes tui_make_status_line to be a method on
tui_locator_window. This is a minor cleanup.
This also changes the new method to use the locator's width, rather
than the terminal width. This is important if we ever want to allow
windows to be made more narrow.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window) <make_status_line>:
Declare.
* tui/tui-stack.c (tui_locator_window::make_status_line): Rename
from tui_make_status_line.
(tui_locator_window::rerender): Update.
|
|
This changes tui_make_status_line to return std::string. This cleans
it up a bit, and removes some explicit memory management.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-stack.c (tui_make_status_line): Return std::string.
(tui_locator_window::rerender): Update.
|
|
The "fullname" field in tui_source_window_base is only used by one
subclass. This patch moves the field to that subclass, and changes it
to be a unique_xmalloc_ptr.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<~tui_source_window_base>: Don't declare.
<fullname>: Remove.
* tui/tui-winsource.c (~tui_source_window_base): Remove.
* tui/tui-source.h (struct tui_source_window) <fullname>: New
member.
* tui/tui-source.c (tui_source_window::set_contents): Update.
(tui_source_window::location_matches_p)
(tui_source_window::maybe_update): Update.
|
|
This changes tui_source_element::line to be a unique_xmalloc_ptr,
removing some manual memory management.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (~tui_source_element): Remove.
(tui_source_element): Update.
(struct tui_source_element) <line>: Now a unique_xmalloc_ptr.
* tui/tui-winsource.c (tui_show_source_line): Update.
* tui/tui-source.c (tui_source_window::set_contents): Update.
* tui/tui-disasm.c (tui_disasm_window::set_contents): Update.
|
|
The calls to tui_clear_source_windows_detail in tui_add_win_to_layout
aren't needed, because (after the resize unification) resizing will
update the window contents. Removing these calls lets us remove
several other things as well.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui-data.h (tui_clear_source_windows_detail): Don't
declare.
* tui/tui-layout.c (tui_add_win_to_layout): Don't call
tui_clear_source_windows_detail.
* tui/tui-winsource.h (struct tui_source_window_base)
<clear_detail>: Don't declare.
* tui/tui-winsource.c (tui_source_window_base::clear_detail):
Remove.
* tui/tui-data.c (tui_clear_source_windows_detail): Remove.
|
|
Readline 8.0 has a feature that lets an application name a keymap.
This in turn makes it simpler for users to bind keys in keymaps in
their .inputrc.
This patch gives a name to the TUI SingleKey keymap, so that
additional bindings can be made there. For example:
$if gdb
set keymap SingleKey
"X": "echo hello\\n\n"
$endif
The call to rl_initialize, in tui_initialize_readline, had to be
removed so that .inputrc was not read too early. Note that Readline
explicitly documents that this call is not needed.
gdb/ChangeLog
2019-09-18 Tom Tromey <tom@tromey.com>
* NEWS: Add entry.
* tui/tui.c (tui_initialize_readline): Set name of keymap. Do not
call rl_initialize.
(tui_enable): Do not call rl_initialize.
gdb/doc/ChangeLog
2019-09-18 Tom Tromey <tom@tromey.com>
* gdb.texinfo (Editing): Document readline application name.
(TUI Single Key Mode): Document TUI SingleKey keymap name.
|
|
This changes the "info win" command to use ui-out. This yields
somewhat nicer table output.
gdb/ChangeLog
2019-09-09 Tom Tromey <tom@tromey.com>
* tui/tui-win.c (tui_all_windows_info): Use ui_out.
|
|
If a TUI window has a long title, it can overflow the title line.
This changes the TUI to use just the tail part of the title in this
case.
gdb/ChangeLog
2019-09-08 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c (box_win): Truncate long window titles.
gdb/testsuite/ChangeLog
2019-09-08 Tom Tromey <tom@tromey.com>
* gdb.tui/resize.exp: Remove setup_xfail.
* gdb.tui/regs.exp: Remove setup_xfail.
* gdb.tui/basic.exp: Remove setup_xfail.
|
|
The TUI has two duplicate "re-render this window" methods, "rerender"
and "refresh_all". They differ only slightly in semantics, so I
wanted to see if they could be unified.
After looking into this, I decided that refresh_all was not needed.
There are 4 calls to tui_refresh_all_win (the only caller of this
method):
1. tui_enable. This sets the layout, which renders the windows.
2. tui_cont_sig. Here, I think it's sufficient to simply redraw the
current window contents from the curses backing store, because gdb
state didn't change while it was suspended
3. tui_dispatch_ctrl_char. This is the C-l handler, and here it's
explicitly enough to just refresh the screen (as above).
4. tui_refresh_all_command. This is the command equivalent of C-l.
So, this patch removes this method entirely and simplifies
tui_refresh_all_win.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<refresh_all>: Don't declare.
* tui/tui-winsource.c (tui_source_window_base::refresh_all):
Remove.
* tui/tui-win.c (tui_refresh_all_win): Don't call refresh_all or
tui_show_locator_content.
* tui/tui-regs.h (struct tui_data_window) <refresh_all>: Don't
declare.
* tui/tui-regs.c (tui_data_window::refresh_all): Remove.
* tui/tui-data.h (struct tui_win_info) <refresh_all>: Don't
declare.
|
|
tui_cont_sig does not need to call wrefresh, because this is already
done by tui_refresh_all_win.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-io.c (tui_cont_sig): Don't call wrefresh.
|
|
This move _initialize_tui_stack to the end of tui-stack.c, per the gdb
style; and then removes two unnecessary forward declarations.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-stack.c (_initialize_tui_stack): Move later.
Remove unnecessary forward declarations.
|
|
This changes tui_locator_window::set_locator_fullname to re-render the
locator window, so that the callers don't need to do this.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-stack.c (tui_locator_window::set_locator_fullname): Call
rerender.
(tui_update_locator_fullname, tui_show_frame_info): Don't call
tui_show_locator_content.
|
|
This swaps the bodies ot tui_show_locator_content and
tui_locator_window::rerender, so that the latter does the work, and
the former is now just an exported convenience wrapper.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-stack.c (tui_show_locator_content): Move lower. Rewrite.
(tui_locator_window::rerender): Rewrite using body of previous
tui_show_locator_content.
|
|
This changes tui_set_locator_fullname and tui_set_locator_info to be
methods on tui_locator_window. This enables some subsequent
cleannups.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window) <set_locator_info,
set_locator_fullname>: New methods.
* tui/tui-stack.c (tui_locator_window::set_locator_fullname):
Rename from tui_set_locator_fullname.
(tui_locator_window::set_locator_info): Rename from
tui_set_locator_info. Return bool.
(tui_update_locator_fullname, tui_show_frame_info): Update.
|
|
show_layout calls tui_refresh_all in one case. However, it doesn't
need to any more, because the resize method on each window will also
update the contents.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-layout.c (show_layout): Don't call tui_refresh_all.
|
|
The call to touchwin in tui_gen_win_info::refresh_window was an
artifact of some earlier refactorings. Testing shows it isn't needed
any more -- I believe it was only ever needed for the data item window
display problem; but that's been solved more locally.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c (tui_gen_win_info::refresh_window): Don't
call touchwin.
|
|
box_win can't be called with a NULL window, or with an invisible
window. So, the NULL checks in that function can be removed.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c (box_win): Assume win_info and
win_info->handle cannot be NULL.
|
|
This patch starts with the observation that the code in
tui_data_window::display_registers_from can all be replaced with a
call to resize. To make this work propertly, it also changes
tui_display_register to be the "rerender" method on
tui_data_item_window.
The refresh_window method is needed due to the use of nested windows
here. The ncurses man page makes it sound like this is not very well
supported; and experience bears this out: negelecting the touchwin
call in this path will cause the register window to blank when
switching focus.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_item_window) <rerender,
refresh_window>: Declare.
* tui/tui-regs.c (tui_data_window::display_registers_from): Call
resize.
(tui_data_item_window::rerender): Rename from
tui_display_register.
(tui_data_item_window::refresh_window): New method.
* tui/tui-layout.c (tui_gen_win_info::resize): Do nothing on
no-op.
|
|
This changes tui_data_window so that the data members are private.
This required the addition of a simple accessor method in one case.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_window) <regs_content,
regs_column_count, current_group>: Move later. Now private.
<get_current_group>: New method.
* tui/tui-regs.c (tui_reg_command): Update.
* tui/tui-layout.c (tui_set_layout): Update.
|
|
This patch removes a call to erase_data_content in refresh_all and
then removes some other calls that are more clearly unnecessary once
one follows calls from that point.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_data_window::display_registers_from_line)
(tui_data_window::rerender): Don't call
check_and_display_highlight_if_needed.
(tui_data_window::refresh_all): Remove call to
erase_data_content.
|
|
A few methods in tui_data_window check whether the contents are empty;
but all the callers already check this, so these calls can be removed.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_data_window::last_regs_line_no)
(tui_data_window::display_registers_from)
(tui_data_window::display_reg_element_at_line)
(tui_data_window::display_registers_from_line): Remove checks of
"empty".
|
|
tui_data_window::rerender clears the data item windows, and then calls
display_all_data. However, that method only does anything if the
contents are not empty. So, display_all_data can be renamed and the
wrapper removed.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_window) <display_all_data>:
Don't declare.
* tui/tui-regs.c (tui_data_window::show_registers): Call
rerender.
(tui_data_window::rerender): Rename from display_all_data.
(tui_data_window::rerender): Remove old implementation.
|
|
NO_DATA_STRING shouldn't be used. It's referenced in a single spot,
in tui_data_window::display_all_data. This patch removes the use and
replaces it with the more correct text. A later patch (though not in
this series) will remove this call entirely, when it's more obviously
correct to do so.
gdb/ChangeLog
2019-08-30 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_data_window::display_all_data): Change
text.
* tui/tui-data.h (NO_DATA_STRING): Remove define.
|
|
gdb/ChangeLog:
2019-08-21 Christian Biesinger <cbiesinger@google.com>
* tui/tui-data.h (tui_gen_win_info): Add an =default
move constructor, required by some GCC versions.
|
|
Turning various calls into methods has made it possible to now change
some tui_data_window methods to be private.
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_window) <last_regs_line_no,
line_from_reg_element_no, first_reg_element_no_inline,
display_all_data, delete_data_content_windows,
erase_data_content>: Now private.
|
|
This removes the HILITE and NO_HILITE defines from tui-data.h, in
favor of simply passing a bool to box_win.
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c (box_win): Change type of highlight_flag.
(tui_unhighlight_win, tui_highlight_win)
(tui_win_info::make_window): Update.
* tui/tui-data.h (HILITE, NO_HILITE): Remove.
|
|
Some #defines in tui-data.h are only used in tui-stack.c, so move them
there.
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-data.h (PROC_PREFIX, LINE_PREFIX, PC_PREFIX)
(MIN_LINE_WIDTH, MIN_PROC_WIDTH, MAX_TARGET_WIDTH)
(MAX_PID_WIDTH): Move to tui-stack.c.
* tui/tui-stack.c (PROC_PREFIX, LINE_PREFIX, PC_PREFIX)
(MIN_LINE_WIDTH, MIN_PROC_WIDTH, MAX_TARGET_WIDTH)
(MAX_PID_WIDTH): Move from tui-data.h.
|
|
I combined several small changes into one patch here. I believe I
started by noticing that the "title" is not needed by tui_gen_win_info
and could be self-managing (i.e. std::string). Moving this revealed
that "can_box" is also a property of tui_win_info and not
tui_gen_win_info; and this in turn caused the changes to
tui_make_window and box_win.
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.h (tui_make_window): Don't declare.
* tui/tui-wingeneral.c (box_win): Change type of win_info.
(box_win): Update.
(tui_gen_win_info::make_window): Rename from tui_make_window.
(tui_win_info::make_window): New method.
(tui_gen_win_info::make_visible): Update.
* tui/tui-source.c (tui_source_window::set_contents): Update.
* tui/tui-regs.c (tui_data_window::show_register_group): Update.
(tui_data_window::display_registers_from): Update.
* tui/tui-layout.c (tui_gen_win_info::resize): Update.
* tui/tui-data.h (struct tui_gen_win_info) <make_window>:
Declare.
<can_box>: Remove.
<title>: Remove.
(struct tui_win_info) <make_window>: Declare.
<can_box>: Now virtual.
<title>: New member.
* tui/tui-data.c (~tui_gen_win_info): Don't free title.
* tui/tui-command.c (tui_cmd_window::resize): Update.
|
|
There's no need for tui_data_window::display_regs any more (if there
ever was). All the paths through data window construction will end up
setting this to true. This patch removes the member.
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_window) <display_regs>: Remove.
* tui/tui-regs.c (tui_data_window::show_registers): Update.
(tui_data_window::check_register_values): Update.
|
|
tui_data_window::regs_content is currently a vector of unique_ptr.
However, due to the way this is managed now, there is no need to keep
the pointers -- it can simply be a vector of the objects themselves.
This patch removes this extra layer of indirection.
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_window): Use
DISABLE_COPY_AND_ASSIGN.
<regs_content>: Change type, removing unique_ptr.
<tui_data_window>: Add move constructor.
* tui/tui-regs.c (tui_data_window::show_registers)
(tui_data_window::show_register_group)
(tui_data_window::display_registers_from)
(tui_data_window::display_registers_from)
(tui_data_window::first_data_item_displayed)
(tui_data_window::delete_data_content_windows)
(tui_data_window::rerender, tui_data_window::refresh_window)
(tui_data_window::check_register_values): Update.
|
|
This changes tui_show_registers and tui_show_register_group to be
methods on tui_data_window.
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_window) <show_registers,
show_register_group>: Declare.
(tui_show_register_group): Don't declare.
* tui/tui-regs.c (tui_data_window::show_registers): Rename from
tui_show_registers.
(tui_data_window::show_register_group): Rename from
tui_show_register_group.
(tui_data_window::check_register_values, tui_reg_command):
Update.
* tui/tui-layout.c (tui_set_layout): Update.
|
|
This changes tui_check_register_values to be a method on
tui_data_window. An additional check in tui_register_changed is
needed, because TUI_DATA_WIN could be NULL at this point.
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_window) <check_register_values>:
Declare.
(tui_check_register_values): Don't declare.
* tui/tui-regs.c (tui_data_window::check_register_values): Rename
from tui_check_register_values.
* tui/tui-hooks.c (tui_register_changed): Update.
|
|
This moves tui_reg_layout later in tui-regs.c, closer to where it is
used.
It also changes tui_show_registers not to enable the TUI or change the
layout -- this is already done by this point by all the callers.
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_reg_layout): Move later.
(tui_show_registers): Don't enable TUI mode or change layout.
|
|
This changes tui_data_item_window::content to be a unique_xmalloc_ptr
and fixes up the fallout. It also removes a parameter from
tui_expand_tabs, as it was only ever given one value.
This also removes some tab-handling code from
tui_data_window::display_registers_from. Because the content can only
be set by tui_register_format, and because that calls tui_expand_tabs,
it's not possible to see a tab here.
gdb/ChangeLog
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_item_window)
<~tui_data_item_window>: Remove.
<content>: Now a unique_xmalloc_ptr.
* tui/tui-regs.c (tui_register_format): Return a
unique_xmalloc_ptr.
(tui_get_register): Update.
(~tui_data_item_window): Remove.
(tui_data_window::display_registers_from, tui_display_register):
Update.
* tui/tui-io.h (tui_expand_tabs): Update.
* tui/tui-io.c (tui_expand_tabs): Return a unique_xmalloc_ptr.
Remove "col" parameter.
|
|
The field tui_data_item_window::value is not used, so remove it.
gdb/ChangeLog
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (struct tui_data_item_window) <value>: Remove
field.
* tui/tui-regs.c (~tui_data_item_window): Update.
|
|
This moves a couple of functions earlier in tui-regs.c. Previously
they were in the "command" section of the file, but really they belong
in the "window implementation" section.
gdb/ChangeLog
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_register_format, tui_get_register): Move
earlier.
|
|
tui_reg_command has an unnecessary NULL check. The preceding call to
tui_reg_layout will ensure the window exists. This patch removes the
check.
gdb/ChangeLog
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_reg_command): Remove NULL check.
|
|
The TUI has a few #defines that hold user-visible strings. As these
are only used in a single spot, this patch removes the defines,
preferring direct use of the string where needed. Furthermore, now
the strings are wrapped in _(), which is friendlier for i18n purposes.
gdb/ChangeLog
2019-08-20 Tom Tromey <tom@tromey.com>
* tui/tui-source.h (struct tui_source_window): Update.
* tui/tui-regs.c (tui_show_registers): Update.
* tui/tui-disasm.h (struct tui_disasm_window): Update.
* tui/tui-data.h (NO_SRC_STRING, NO_DISASSEM_STRING)
(NO_REGS_STRING): Remove defines.
|
|
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.
|
|
tui_remove_hooks clears deprecated_query_hook, but nothing in the TUI
ever sets it; so remove the assignment.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-hooks.c (tui_remove_hooks): Don't set
deprecated_query_hook.
|
|
This changes tui_show_symtab_source to be a method on
tui_source_window.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c (tui_update_source_windows_with_addr)
(tui_update_source_windows_with_line): Update.
* tui/tui-source.h (struct tui_source_window)
<show_symtab_source>: Declare.
(tui_show_symtab_source): Don't declare.
* tui/tui-source.c (tui_show_symtab_source): Rename from
tui_show_symtab_source.
|
|
This introduces the tui_source_window_base::set_contents method and
implements it in the subclasses. This removes a check of the window
type.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<set_contents>: Declare.
* tui/tui-winsource.c
(tui_source_window_base::update_source_window_as_is): Update.
* tui/tui-source.h (struct tui_source_window) <set_contents>:
Declare.
(tui_set_source_content): Don't declare.
* tui/tui-source.c (tui_source_window::set_contents): Rename from
tui_set_source_content.
* tui/tui-disasm.h (struct tui_disasm_window) <set_contents>:
Declare.
(tui_set_disassem_content): Don't declare.
* tui/tui-disasm.c (tui_disasm_window::set_contents): Rename from
tui_set_disassem_content.
|
|
This changes tui_update_breakpoint_info to be a method on
tui_source_window_base.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<update_breakpoint_info>: Declare.
(tui_update_breakpoint_info): Don't declare.
* tui/tui-winsource.c (tui_source_window_base::update_source_window_as_is)
(tui_update_all_breakpoint_info): Update.
(tui_source_window_base::update_breakpoint_info): Rename from
tui_update_breakpoint_info.
(tui_source_window_base::update_exec_info): Update.
|
|
This changes tui_update_source_window to be a method on
tui_source_window_base.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<update_source_window>: Declare.
(tui_update_source_window): Don't declare.
* tui/tui-winsource.c
(tui_source_window_base::update_source_window): Rename from
tui_update_source_window.
(tui_source_window_base::rerender): Update.
* tui/tui-source.c (tui_source_window::maybe_update): Update.
* tui/tui-disasm.c (tui_show_disassem)
(tui_show_disassem_and_update_source)
(tui_disasm_window::maybe_update): Update.
|
|
This changes tui_update_source_window_as_is to be a method on
tui_source_window_base.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<update_source_window_as_is>: Declare.
(tui_update_source_window_as_is): Don't declare.
* tui/tui-winsource.c (tui_update_source_window): Update
(tui_source_window_base::update_source_window_as_is): Rename from
tui_update_source_window_as_is.
(tui_source_window_base::refill): Update.
* tui/tui-source.c (tui_show_symtab_source): Update.
* tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical):
Update.
|
|
A few TUI functions take a "noerror" parameter. This is only checked
in one spot: in tui_set_source_content, if noerror is false, and if an
error occurs, then the function will call print_sys_errmsg.
This seems misguided to me, so this patch removes that code and this
parameter.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (tui_update_source_window)
(tui_update_source_window_as_is): Remove "noerror" parameter.
* tui/tui-winsource.c (tui_update_source_window)
(tui_update_source_window_as_is): Remove "noerror" parameter.
(tui_update_source_windows_with_addr)
(tui_update_source_windows_with_line)
(tui_source_window_base::rerender)
(tui_source_window_base::refill): Update.
* tui/tui-source.h (tui_set_source_content)
(tui_show_symtab_source): Remove "noerror" parameter.
* tui/tui-source.c (tui_set_source_content): Remove "noerror"
parameter.
(tui_show_symtab_source): Likewise.
(tui_source_window::maybe_update): Update.
* tui/tui-disasm.c (tui_show_disassem)
(tui_show_disassem_and_update_source)
(tui_disasm_window::do_scroll_vertical)
(tui_disasm_window::maybe_update): Update.
|
|
TUI windows keep track of their visibility in a boolean field.
However, this is not needed, because a window is visible if and only
if it has an underlying curses handle. So, we can remove this
separate field.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui.c (tui_is_window_visible): Update.
* tui/tui-wingeneral.c (tui_make_window)
(tui_gen_win_info::make_visible, tui_refresh_all): Update.
* tui/tui-win.c (window_name_completer, tui_refresh_all_win)
(tui_set_focus_command, tui_all_windows_info, update_tab_width)
(tui_set_win_height_command, parse_scrolling_args): Update.
* tui/tui-source.c (tui_source_window::style_changed): Update.
* tui/tui-regs.c (tui_show_registers)
(tui_data_window::first_data_item_displayed)
(tui_data_window::delete_data_content_windows)
(tui_check_register_values, tui_reg_command): Update.
* tui/tui-disasm.c (tui_show_disassem): Update.
* tui/tui-data.h (struct tui_gen_win_info) <is_visible>: New
method.
<is_visible>: Remove field.
* tui/tui-data.c (tui_next_win, tui_prev_win)
(tui_delete_invisible_windows): Update.
|
|
The previous patch removed the only use of m_has_locator, so this
member can now be removed.
gdb/ChangeLog
2019-08-16 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
<m_has_locator>: Remove.
* tui/tui-layout.c (show_source_disasm_command, show_data)
(show_source_or_disasm_and_command): Update.
|
|
The TUI currently has two different ways to resize a window: the
resize method, and the methods make_invisible_and_set_new_height and
make_visible_with_new_height.
There's no deep reason to have two different ways to resize a window,
so this patch unifies them, leaving just the "resize" method.
This also changes the locator to be handled more like an ordinary
window and less like an adjunct of the associated source window.
gdb/ChangeLog
2019-08-15 Tom Tromey <tom@tromey.com>
* tui/tui-io.c (tui_puts_internal): Check TUI_CMD_WIN before
calling update_cmdwin_start_line.
* tui/tui-winsource.h (struct tui_source_window_base)
<do_make_visible_with_new_height, set_new_height>: Don't declare.
<rerender>: Declare.
* tui/tui-winsource.c (tui_source_window_base::update_tab_width):
Call rerender.
(tui_source_window_base::set_new_height): Remove.
(tui_source_window_base::rerender): Rename from
do_make_visible_with_new_height.
* tui/tui-win.c (tui_resize_all, tui_adjust_win_heights): Use
resize method.
(tui_win_info::make_invisible_and_set_new_height)
(tui_win_info::make_visible_with_new_height): Remove.
* tui/tui-stack.h (struct tui_locator_window) <rerender>:
Declare.
* tui/tui-stack.c (tui_locator_window::rerender): New method.
* tui/tui-regs.h (struct tui_data_window) <set_new_height,
do_make_visible_with_new_height>: Don't declare.
<rerender>: Declare.
* tui/tui-regs.c (tui_data_window::rerender): Rename from
set_new_height.
(tui_data_window::do_make_visible_with_new_height): Remove.
* tui/tui-layout.c (show_source_disasm_command, show_data): Don't
call tui_show_locator_content.
(tui_gen_win_info::resize): Call rerender.
(show_source_or_disasm_and_command): Don't call
tui_show_locator_content.
* tui/tui-data.h (struct tui_gen_win_info) <rerender>: New
method.
(struct tui_win_info) <rerender>: Declare.
<set_new_height, make_invisible_and_set_new_height,
make_visible_with_new_height>: Don't declare.
* tui/tui-data.c (tui_win_list::rerender): New method.
* tui/tui-command.h (struct tui_cmd_window)
<do_make_visible_with_new_height>: Don't declare.
* tui/tui-command.c
(tui_cmd_window::do_make_visible_with_new_height): Remove.
gdb/testsuite/ChangeLog
2019-08-15 Tom Tromey <tom@tromey.com>
* gdb.tui/empty.exp: Enable resizing tests.
|