Use TUI_DISASM_WIN instead of tui_win_list array
authorTom Tromey <tom@tromey.com>
Sat, 22 Feb 2020 18:48:26 +0000 (11:48 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 22 Feb 2020 18:48:27 +0000 (11:48 -0700)
This is a minor cleanup to change tui_get_low_disassembly_address to
use TUI_DISASM_WIN, rather than the tui_win_list array.  This is more
in line with what the rest of the TUI code does.

gdb/ChangeLog
2020-02-22  Tom Tromey  <tom@tromey.com>

* tui/tui-disasm.c (tui_get_low_disassembly_address): Use
TUI_DISASM_WIN, not tui_win_list.

Change-Id: I999335ee3f63a4b570e84f320236b78f2bd5b780

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

index ecdce315f7e02747bb7be6e569bd969f7637bea1..532ab92b31d5398e64d5014cf2bac89dd26b184b 100644 (file)
@@ -1,3 +1,8 @@
+2020-02-22  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
+       TUI_DISASM_WIN, not tui_win_list.
+
 2020-02-22  Tom Tromey  <tom@tromey.com>
 
        * valprint.c (generic_val_print_enum_1)
index 547d2c9e6d684f0ce7474f2fe1b74bae70376237..b0b53d64a68532596677cab0502814cf0e9bfa00 100644 (file)
@@ -429,8 +429,8 @@ tui_get_low_disassembly_address (struct gdbarch *gdbarch,
 
   /* Determine where to start the disassembly so that the pc is about
      in the middle of the viewport.  */
-  if (tui_win_list[DISASSEM_WIN] != NULL)
-    pos = tui_win_list[DISASSEM_WIN]->height;
+  if (TUI_DISASM_WIN != NULL)
+    pos = TUI_DISASM_WIN->height;
   else if (TUI_CMD_WIN == NULL)
     pos = tui_term_height () / 2 - 2;
   else