public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Katharina Bogad <katharina@bogad.at>
To: Nick Clifton <nickc@redhat.com>
Cc: "binutils@sourceware.org" <binutils@sourceware.org>
Subject: Re: Readelf: --wide as default if output is redirected
Date: Thu, 17 Sep 2020 10:36:29 +0000	[thread overview]
Message-ID: <B224734B-F220-4A9B-A686-708B95BFBFE0@bogad.at> (raw)
In-Reply-To: <0c4f8085-3403-4984-e370-f8624c048438@redhat.com>

Hi Nick, 

> Which version of readelf ?  

2.31 and 2.24. I am kind of stuck with the latter one because it belongs to
an embedded systems development SDK I have no control over.

> I added a new feature to the 2.35 release so that by default readelf will 
> suffix truncated symbol names with "[...]", thus letting the reader know
> that the name has been abbreviated.

Yeah, that at least makes it obvious. Thank you!

> Yeah, I think that changing the default behaviour like this would be a bad
> idea.  But of course you can always create a wrapper script that adds the --wide
> option (and maybe invokes the pager at the same time).

Well, my argument would be that redirection is good for basically three
things:
  - archival
  - automated processing
  - reading in a pager

Truncating the output IMO does not add value in any of these cases; with
the obvious exception being pagers that can’t be configured to not wrap lines.
In fact, I’d make the argument that it is counter-productive for archival and
automated processing (you’d have to pass --wide anyways to get accurate
results, and it was definitely a gotcha for me, making the behaviour non-
obvious). Maybe I am missing something, but I can’t think of a use-case 
where truncating would add value besides viewing in a width-restricted 
terminal.

But really, I’m fine either way. Future me will thank you for the dots once I 
forget that --wide is a thing and binutils >=2.35 has hit my toolchains.

Best,
Katharina

  reply	other threads:[~2020-09-17 10:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 16:06 Katharina Bogad
2020-09-16 18:01 ` H.J. Lu
2020-09-17  9:55 ` Nick Clifton
2020-09-17 10:36   ` Katharina Bogad [this message]
2020-09-17 15:37     ` Nick Clifton
2020-09-17 15:59     ` Fangrui Song
2020-09-18 13:57       ` Mark Wielaard

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=B224734B-F220-4A9B-A686-708B95BFBFE0@bogad.at \
    --to=katharina@bogad.at \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /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).