[binutils-gdb] binutils: objdump: ctf: drop incorrect linefeeds

Nick Alcock nix@sourceware.org
Wed Jul 22 17:12:07 GMT 2020


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

commit 3dd6b890b4e2c1d908a5279f8f01c2a576ef9db3
Author: Nick Alcock <nick.alcock@oracle.com>
Date:   Fri Jun 5 23:13:01 2020 +0100

    binutils: objdump: ctf: drop incorrect linefeeds
    
    The CTF objdumping code is adding linefeeds in calls to non_fatal, which
    is wrong and looks ugly.
    
    binutils/
            * objdump.c (dump_ctf_archive_member): Remove linefeeds.
            (dump_ctf): Likewise.

Diff:
---
 binutils/ChangeLog | 5 +++++
 binutils/objdump.c | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 716950977a6..3705915aa63 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+	* objdump.c (dump_ctf_archive_member): Remove linefeeds.
+	(dump_ctf): Likewise.
+
 2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
 
 	* objdump.c (ctf_archive_member): Print CTF errors and warnings.
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 8d4b1b6ba94..978d86cb1fd 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -4115,7 +4115,7 @@ dump_ctf_archive_member (ctf_file_t *ctf, const char *name, void *arg)
 
       if (ctf_errno (ctf))
 	{
-	  non_fatal (_("Iteration failed: %s, %s\n"), *thing,
+	  non_fatal (_("Iteration failed: %s, %s"), *thing,
 		   ctf_errmsg (ctf_errno (ctf)));
 	  break;
 	}
@@ -4162,7 +4162,7 @@ dump_ctf (bfd *abfd, const char *sect_name, const char *parent_name)
   ctfsect = make_ctfsect (sect_name, ctfdata, ctfsize);
   if ((ctfa = ctf_bfdopen_ctfsect (abfd, &ctfsect, &err)) == NULL)
     {
-      non_fatal (_("CTF open failure: %s\n"), ctf_errmsg (err));
+      non_fatal (_("CTF open failure: %s"), ctf_errmsg (err));
       bfd_fatal (bfd_get_filename (abfd));
     }
 
@@ -4171,7 +4171,7 @@ dump_ctf (bfd *abfd, const char *sect_name, const char *parent_name)
       ctfsect = make_ctfsect (parent_name, parentdata, parentsize);
       if ((parenta = ctf_bfdopen_ctfsect (abfd, &ctfsect, &err)) == NULL)
 	{
-	  non_fatal (_("CTF open failure: %s\n"), ctf_errmsg (err));
+	  non_fatal (_("CTF open failure: %s"), ctf_errmsg (err));
 	  bfd_fatal (bfd_get_filename (abfd));
 	}
 
@@ -4185,7 +4185,7 @@ dump_ctf (bfd *abfd, const char *sect_name, const char *parent_name)
      put CTFs and their parents in archives together.)  */
   if ((parent = ctf_arc_open_by_name (lookparent, NULL, &err)) == NULL)
     {
-      non_fatal (_("CTF open failure: %s\n"), ctf_errmsg (err));
+      non_fatal (_("CTF open failure: %s"), ctf_errmsg (err));
       bfd_fatal (bfd_get_filename (abfd));
     }


More information about the Binutils-cvs mailing list