From patchwork Fri Sep 6 23:27:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 34433 Received: (qmail 33116 invoked by alias); 6 Sep 2019 23:34:14 -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 33108 invoked by uid 89); 6 Sep 2019 23:34:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Sep 2019 23:34:13 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D49D10F2EAB for ; Fri, 6 Sep 2019 23:28:14 +0000 (UTC) Received: from localhost.localdomain (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 958D95D9D3 for ; Fri, 6 Sep 2019 23:28:13 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 04/23] exceptions.c:print_flush: Remove obsolete check Date: Sat, 7 Sep 2019 00:27:48 +0100 Message-Id: <20190906232807.6191-5-palves@redhat.com> In-Reply-To: <20190906232807.6191-1-palves@redhat.com> References: <20190906232807.6191-1-palves@redhat.com> Commit 20f0d60db4fb ("Avoid crash when calling warning too early"), added a "current_top_target () != NULL" check to target_supports_terminal_ours, so this check in exceptions.c is now obsolete. gdb/ChangeLog: yyyy-mm-dd Pedro Alves * exceptions.c (print_flush): Remove current_top_target() check. --- gdb/exceptions.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gdb/exceptions.c b/gdb/exceptions.c index a405947257..3dccda78e2 100644 --- a/gdb/exceptions.c +++ b/gdb/exceptions.c @@ -39,11 +39,7 @@ print_flush (void) deprecated_error_begin_hook (); gdb::optional term_state; - /* While normally there's always something pushed on the target - stack, the NULL check is needed here because we can get here very - early during startup, before the target stack is first - initialized. */ - if (current_top_target () != NULL && target_supports_terminal_ours ()) + if (target_supports_terminal_ours ()) { term_state.emplace (); target_terminal::ours_for_output ();