From patchwork Thu Jul 4 17:03:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 33589 Received: (qmail 113850 invoked by alias); 4 Jul 2019 17:04:22 -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 108119 invoked by uid 89); 4 Jul 2019 17:03:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.4 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=H*RU:esmtpa, H*r:esmtpa X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.144.80) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Jul 2019 17:03:38 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway31.websitewelcome.com (Postfix) with ESMTP id A2D75A711 for ; Thu, 4 Jul 2019 12:03:37 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id j58zhF0aW90onj58zhBMnV; Thu, 04 Jul 2019 12:03:37 -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=lSy00BzmzrLPa+QRO5ZNPsJGBUftiftSYi8jQQ+jdUY=; b=MZXEAZKPwbUC2kvY8ZzVI+1spD ylu8+PeSXrXeCJHvmYf8IGbepgiHlllyIcYltzVpkqAwJ7Om9WK5J//dyIOz0jB1tdMNj922NN8mn yGxcSTihq4VPiiiVNsWTLdJEn; Received: from 174-29-58-150.hlrn.qwest.net ([174.29.58.150]:34706 helo=bapiya.Home) by box5379.bluehost.com with esmtpa (Exim 4.92) (envelope-from ) id 1hj58z-002sQh-CT; Thu, 04 Jul 2019 12:03:37 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 60/61] Fix an error in parse_scrolling_args Date: Thu, 4 Jul 2019 11:03:10 -0600 Message-Id: <20190704170311.15982-61-tom@tromey.com> In-Reply-To: <20190704170311.15982-1-tom@tromey.com> References: <20190704170311.15982-1-tom@tromey.com> parse_scrolling_args combines two errors into one message, which also happens to end with a newline. This separates the errors and fixes the message. 2019-07-04 Tom Tromey * tui/tui-win.c (parse_scrolling_args): Throw separate errors. --- gdb/ChangeLog | 4 ++++ gdb/tui/tui-win.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 1e02c42dbd1..db4dc1088a6 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -1391,10 +1391,10 @@ parse_scrolling_args (const char *arg, *win_to_scroll = tui_partial_win_by_name (wname); - if (*win_to_scroll == NULL - || !(*win_to_scroll)->is_visible) - error (_("Invalid window specified. \n\ -The window name specified must be valid and visible.\n")); + if (*win_to_scroll == NULL) + error (_("Unrecognized window `%s'"), wname); + if (!(*win_to_scroll)->is_visible) + error (_("Window is not visible")); else if (*win_to_scroll == TUI_CMD_WIN) *win_to_scroll = tui_source_windows ()[0]; }