diff options
author | Patrick Palka <patrick@parcs.ath.cx> | 2015-06-26 20:38:30 -0400 |
---|---|---|
committer | Patrick Palka <patrick@parcs.ath.cx> | 2015-06-30 13:56:17 -0400 |
commit | b5fca6d7284b2cd2e90efc556eb6a29a1b177476 (patch) | |
tree | d0494223e8b57f56e1ecd22d3d0400fe5fc4cb0e /gdb/frame.h | |
parent | c45613e33dbdc646b6fd7f02f86635639e852bfb (diff) | |
download | gdb-b5fca6d7284b2cd2e90efc556eb6a29a1b177476.zip gdb-b5fca6d7284b2cd2e90efc556eb6a29a1b177476.tar.gz gdb-b5fca6d7284b2cd2e90efc556eb6a29a1b177476.tar.bz2 |
Be lazy about refreshing the windows in tui_show_frame_info (PR tui/13378)
tui_show_frame_info is responsible for updating the visible windows
following a change in frame information (that being the currently
selected frame, PC, line number, etc). Currently it always redraws and
refreshes each window even if frame information has not changed. This
behavior is inefficient and helps contribute to the occassional
flickering of the TUI as described in the mentioned PR.
This patch makes tui_show_frame_info refresh the windows only if frame
information has changed. Determining whether frame information has
changed is done indirectly by determining whether the locator has
changed. This approach is convenient and yet sensible because the
locator contains all the relevant info we need to check anyway: the
current PC, the line number, the name of the executable and the name of
the current function. Probably only the PC is really necessary to
check, but it doesn't hurt to check every field.
Effectively, with this patch, consecutive calls to select_frame with the
same frame/PC no longer cause TUI's frame information to be updated
multiple times.
gdb/ChangeLog:
PR tui/13378
* tui/tui-stack.c (tui_set_locator_info): Change prototype to
return an int instead of void. Return whether the locator
window has changed.
(tui_show_frame_info): If the locator info has not changed, then
bail out early to avoid refreshing the windows.
Diffstat (limited to 'gdb/frame.h')
0 files changed, 0 insertions, 0 deletions