From: Tom Tromey Date: Sat, 22 Feb 2020 18:48:26 +0000 (-0700) Subject: Use TUI_DISASM_WIN instead of tui_win_list array X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a3d458be380d4940fc528dca63ded4c2bab6c12;p=binutils-gdb.git Use TUI_DISASM_WIN instead of tui_win_list array 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 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use TUI_DISASM_WIN, not tui_win_list. Change-Id: I999335ee3f63a4b570e84f320236b78f2bd5b780 --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ecdce315f7e..532ab92b31d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-02-22 Tom Tromey + + * tui/tui-disasm.c (tui_get_low_disassembly_address): Use + TUI_DISASM_WIN, not tui_win_list. + 2020-02-22 Tom Tromey * valprint.c (generic_val_print_enum_1) diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index 547d2c9e6d6..b0b53d64a68 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -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