From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38780 invoked by alias); 21 Aug 2019 02:27:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 38715 invoked by uid 89); 21 Aug 2019 02:27:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.9 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= X-HELO: gateway32.websitewelcome.com Received: from gateway32.websitewelcome.com (HELO gateway32.websitewelcome.com) (192.185.145.108) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Aug 2019 02:27:09 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway32.websitewelcome.com (Postfix) with ESMTP id D24085E7C41 for ; Tue, 20 Aug 2019 21:25:42 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 0GJiiPvpf3Qi00GJii6a8f; Tue, 20 Aug 2019 21:25:42 -0500 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=QRyFm6Xh/y4PDCroFW3AlXWvguxK+9fQ2ZiWStnV0a8=; b=gcC2c15Ovmphhz4y+OAMXCfvNM 0nt/81kipD+gs7S3hLblpPFZ7xTFo49sl2fg+ZFdmXEGsIq9NVGSXvnn5NJ0ao0Gkq7+VCHVSFREv OF4yukaTqFDLzlP9WqQZUzMKt; Received: from 97-122-178-82.hlrn.qwest.net ([97.122.178.82]:48672 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1i0GJi-001K6n-KT; Tue, 20 Aug 2019 21:25:42 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 11/15] Swap tui_show_locator_content and tui_locator_window::rerender Date: Wed, 21 Aug 2019 02:27:00 -0000 Message-Id: <20190821022535.9762-12-tom@tromey.com> In-Reply-To: <20190821022535.9762-1-tom@tromey.com> References: <20190821022535.9762-1-tom@tromey.com> X-SW-Source: 2019-08/txt/msg00456.txt.bz2 This swaps the bodies ot tui_show_locator_content and tui_locator_window::rerender, so that the latter does the work, and the former is now just an exported convenience wrapper. gdb/ChangeLog 2019-08-20 Tom Tromey * tui/tui-stack.c (tui_show_locator_content): Move lower. Rewrite. (tui_locator_window::rerender): Rewrite using body of previous tui_show_locator_content. --- gdb/ChangeLog | 6 ++++++ gdb/tui/tui-stack.c | 38 +++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index a4adf36365e..48062fed712 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -254,38 +254,27 @@ tui_get_function_from_frame (struct frame_info *fi) } void -tui_show_locator_content (void) +tui_locator_window::rerender () { - char *string; - struct tui_locator_window *locator; - - locator = tui_locator_win_info_ptr (); - - if (locator != NULL && locator->handle != NULL) + if (handle != NULL) { - string = tui_make_status_line (locator); - wmove (locator->handle, 0, 0); + char *string = tui_make_status_line (this); + wmove (handle, 0, 0); /* We ignore the return value from wstandout and wstandend, casting them to void in order to avoid a compiler warning. The warning itself was introduced by a patch to ncurses 5.7 dated 2009-08-29, changing these macro to expand to code that causes the compiler to generate an unused-value warning. */ - (void) wstandout (locator->handle); - waddstr (locator->handle, string); - wclrtoeol (locator->handle); - (void) wstandend (locator->handle); - locator->refresh_window (); - wmove (locator->handle, 0, 0); + (void) wstandout (handle); + waddstr (handle, string); + wclrtoeol (handle); + (void) wstandend (handle); + refresh_window (); + wmove (handle, 0, 0); xfree (string); } } -void -tui_locator_window::rerender () -{ - tui_show_locator_content (); -} - /* See tui-stack.h. */ void @@ -411,6 +400,13 @@ tui_show_frame_info (struct frame_info *fi) } } +void +tui_show_locator_content () +{ + struct tui_locator_window *locator = tui_locator_win_info_ptr (); + locator->rerender (); +} + /* Function to initialize gdb commands, for tui window stack manipulation. */ -- 2.17.2