From patchwork Sat Jan 4 18:33:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 37174 Received: (qmail 130176 invoked by alias); 4 Jan 2020 18:34:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 130092 invoked by uid 89); 4 Jan 2020 18:34:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=viewport X-HELO: gateway34.websitewelcome.com Received: from gateway34.websitewelcome.com (HELO gateway34.websitewelcome.com) (192.185.148.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 04 Jan 2020 18:34:14 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 778688C345 for ; Sat, 4 Jan 2020 12:34:13 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id noFZipMQQHunhnoFZi0BgZ; Sat, 04 Jan 2020 12:34:13 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vNZKsDMk8OONdRRKEvhIvNXDSfHpodZD0mCA2a9nOyM=; b=BeJqWElhfL43tnzc4FXCu96A9Q RRpje9rNLw3fgIZqH03MN7ljl70PPaHsKFquvwETizbgFoq+64RaQo5koFt2gF4auSonAwVqA/e+8 SK/W7J6XsRE4YmgDtwdEDKhye; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:48942 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1inoFZ-0026Lh-Ab; Sat, 04 Jan 2020 11:34:13 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 01/24] Use TUI_DISASM_WIN instead of tui_win_list array Date: Sat, 4 Jan 2020 11:33:47 -0700 Message-Id: <20200104183410.17114-2-tom@tromey.com> In-Reply-To: <20200104183410.17114-1-tom@tromey.com> References: <20200104183410.17114-1-tom@tromey.com> 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 * 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(-) 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