This is the mail archive of the
mailing list for the binutils project.
Re: The "-W|--wide" option?
- From: Nick Clifton <nickc at redhat dot com>
- To: "Carlos O'Donell" <carlos_odonell at mentor dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 26 Sep 2011 16:22:12 +0100
- Subject: Re: The "-W|--wide" option?
- References: <4E77AE39.email@example.com>
Must all binutils tool output be wrapped to 80 chars
unless -W|--wide is specified?
The are two main reasons for a tool to have a truncated or wrapped
output format. The first is for clarity - sometimes a terse output is
easier to read. The second is to help automated parsing of the output,
in cases where whitespace cannot be relied upon to separate fields. In
such cases knowing that a given field starts at a given column number
can be useful.
If we wrap, as opposed to truncating, then how does
one wrap something that is a single block larger
than 80 characters?
I do not think that there is a standard for how this should be done.
My first suggestion would be to choose a character that would not appear
in the output line and use this to act as a wrap-has-occurred-here
character. If that is not possible, then my second suggestion would be
to indent the output by one column and then use that first column to
contain a line-continues-here marker.
Do we care to indicate that the wrapping has occurred?
I notice that:
* objdump says it will truncate symbol names without -W.
* readelf says it will break lines (wrap).
Is the current behaviour a historical matter,
> and changing it would not be acceptable because it might
break consumers of this output?
You are presumably considering altering the default output of one or
more of these tools. Adding new, non-default, command line options to
improve or change the formatting of the output is OK. Why is this
important to you ?