Don't use TUI_DISASM_WIN in tui_disasm_window method
authorTom Tromey <tom@tromey.com>
Sun, 16 Jun 2019 22:31:56 +0000 (16:31 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 25 Jun 2019 13:48:28 +0000 (07:48 -0600)
The previous patch made it clear that the diassembly window scrolling
method was written to assume there could only ever be a single
disassembly window.  This changes that spot to use "this" rather than
the TUI_DISASM_WIN global.

gdb/ChangeLog
2019-06-25  Tom Tromey  <tom@tromey.com>

* tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Use
"this", not TUI_DISASM_WIN.

gdb/ChangeLog
gdb/tui/tui-disasm.c

index 109cdd467d118fb4926e7efdceb70dabe0fc435a..56b49cd4a95032887f4058fc5d2ed4bcbfe01651 100644 (file)
@@ -1,3 +1,8 @@
+2019-06-25  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Use
+       "this", not TUI_DISASM_WIN.
+
 2019-06-25  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-winsource.h (tui_horizontal_source_scroll):  Don't
index 838f36cf29591db01825712975089e7ae7d8728c..efb9d1cb628f6a38b4643f85c1e32a63626ad48a 100644 (file)
@@ -393,7 +393,7 @@ tui_disasm_window::do_scroll_vertical
 
       val.loa = LOA_ADDRESS;
       val.u.addr = tui_find_disassembly_address (gdbarch, pc, dir);
-      tui_update_source_window_as_is (TUI_DISASM_WIN, gdbarch,
+      tui_update_source_window_as_is (this, gdbarch,
                                      NULL, val, FALSE);
     }
 }