gdb/tui: Link source and assembler scrolling .... again
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 7 Jan 2020 11:39:17 +0000 (11:39 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 9 Jan 2020 23:11:47 +0000 (23:11 +0000)
commitf5a7c406b1975cde626efed526960f2cf1bdaceb
tree79e1814d89c4158fcab301d2c1891c891962e791
parent9ae6bf640dc7c950e6f36097a3d2d760a132a542
gdb/tui: Link source and assembler scrolling .... again

Until recently when the source window was scrolled the assembler
window would scroll in sync - keeping the disassembly for the current
line in view.

This was broken in commit:

  commit b4b49dcbff6b437fa8b4e2fc0c3f27b457f11310
  Date:   Wed Nov 13 16:47:58 2019 -0700

      Don't call tui_show_source from tui_ui_out

This commit restores the synchronised scrolling and also maintains the
horizontal scroll within the source view when it is vertically
scrolled, something that was broken before.

This commit does not mean that scrolling the assembler view scrolls
the source view.  The connection this way never existed, though maybe
it should, but I'll leave adding this feature for a separate commit.

gdb/ChangeLog:

* tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
all source windows, and maintain horizontal scroll status while
doing so.

gdb/testsuite/ChangeLog:

* gdb.tui/basic.exp: Add more scrolling tests.

Change-Id: I250114a3bc670040a6a759d41905776771b2f818
gdb/ChangeLog
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.tui/basic.exp
gdb/tui/tui-source.c