public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Remove "\nError: " suffix from nat/fork-inferior.c:trace_start_error warning message
Date: Fri, 30 Aug 2019 21:05:00 -0000	[thread overview]
Message-ID: <20190830210553.101522.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=47a536d940d2f2bccfec51539b857da06ebc429e

commit 47a536d940d2f2bccfec51539b857da06ebc429e
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Thu Aug 29 16:11:45 2019 -0400

    Remove "\nError: " suffix from nat/fork-inferior.c:trace_start_error warning message
    
    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
    
    gdb/ChangeLog:
    2019-08-30  Sergio Durigan Junior  <sergiodj@redhat.com>
    
    	* nat/fork-inferior.c (trace_start_error): Remove "\nError: "
    	suffix from warning message.

Diff:
---
 gdb/ChangeLog           | 5 +++++
 gdb/nat/fork-inferior.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2cc7b58..ebcfae1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-30  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* nat/fork-inferior.c (trace_start_error): Remove "\nError: "
+	suffix from warning message.
+
 2019-08-30  Tom Tromey  <tom@tromey.com>
 
 	* tui/tui-winsource.h (struct tui_source_window_base)
diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index 68b51aa..355e9be 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);


                 reply	other threads:[~2019-08-30 21:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190830210553.101522.qmail@sourceware.org \
    --to=sergiodj@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).