This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Be lazy about refreshing the windows in tui_show_frame_info (PR tui/13378)


*** TEST RESULTS FOR COMMIT b5fca6d7284b2cd2e90efc556eb6a29a1b177476 ***

Author: Patrick Palka <patrick@parcs.ath.cx>
Branch: master
Commit: b5fca6d7284b2cd2e90efc556eb6a29a1b177476

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]