Remove "\nError: " suffix from nat/fork-inferior.c:trace_start_error warning message
authorSergio Durigan Junior <sergiodj@redhat.com>
Thu, 29 Aug 2019 20:11:45 +0000 (16:11 -0400)
committerSergio Durigan Junior <sergiodj@redhat.com>
Fri, 30 Aug 2019 21:04:37 +0000 (17:04 -0400)
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.

gdb/ChangeLog
gdb/nat/fork-inferior.c

index 2cc7b5809e23b7a2f17027d0f74e45dbcdaf8602..ebcfae1f9773d3787bf4f74eeed0c1715eef6885 100644 (file)
@@ -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)
index 68b51aa8146806d7b6620a2595278177986db3fd..355e9bef430308e748901d1820748360eeae0c48 100644 (file)
@@ -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);
 
This page took 0.04649 seconds and 4 git commands to generate.