From patchwork Fri Aug 30 19:51:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Durigan Junior X-Patchwork-Id: 34361 Received: (qmail 106072 invoked by alias); 30 Aug 2019 19:51:08 -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 106064 invoked by uid 89); 30 Aug 2019 19:51:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.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=screen, HContent-Transfer-Encoding:8bit 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, 30 Aug 2019 19:51:07 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A833308FBA6 for ; Fri, 30 Aug 2019 19:51:06 +0000 (UTC) Received: from psique.yyz.redhat.com (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9ADBA5C1D4; Fri, 30 Aug 2019 19:51:03 +0000 (UTC) From: Sergio Durigan Junior To: GDB Patches Cc: Pedro Alves , Sergio Durigan Junior Subject: [PATCH] Remove "\nError: " suffix from nat/fork-inferior.c:trace_start_error warning message Date: Fri, 30 Aug 2019 15:51:02 -0400 Message-Id: <20190830195102.8965-1-sergiodj@redhat.com> In-Reply-To: <87ftljah3a.fsf@redhat.com> References: <87ftljah3a.fsf@redhat.com> MIME-Version: 1.0 X-IsSubscribed: yes Rationale: https://sourceware.org/ml/gdb-patches/2019-08/msg00651.html This very simple patch removes the "\nError: " suffix from the warning message printed by nat/fork-inferior.c:trace_start_error. This proved to just pollute the screen, causing things like: Starting program: /usr/bin/true warning: Could not trace the inferior process. Error: warning: ptrace: Permission denied This "Error: " string is not useful at all, and can confuse things, therefore let's just remove it and simplify the resulting messages: Starting program: /usr/bin/true warning: Could not trace the inferior process. warning: ptrace: Permission denied 2019-08-29 Sergio Durigan Junior * nat/fork-inferior.c (trace_start_error): Remove "\nError: " suffix from warning message. --- gdb/nat/fork-inferior.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c index 68b51aa814..355e9bef43 100644 --- a/gdb/nat/fork-inferior.c +++ b/gdb/nat/fork-inferior.c @@ -580,7 +580,7 @@ trace_start_error (const char *fmt, ...) va_list ap; va_start (ap, fmt); - warning ("Could not trace the inferior process.\nError: "); + warning ("Could not trace the inferior process."); vwarning (fmt, ap); va_end (ap);