Patchwork [01/24] Use TUI_DISASM_WIN instead of tui_win_list array

login
register
mail settings
Submitter Tom Tromey
Date Jan. 4, 2020, 6:33 p.m.
Message ID <20200104183410.17114-2-tom@tromey.com>
Download mbox | patch
Permalink /patch/37174/
State New
Headers show

Comments

Tom Tromey - Jan. 4, 2020, 6:33 p.m.
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-01-04  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        | 5 +++++
 gdb/tui/tui-disasm.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

Patch

diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index c72b50730b0..f482086ca2e 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -302,8 +302,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