This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: The "-W|--wide" option?


Hi Carlos,

Must all binutils tool output be wrapped to 80 chars
unless -W|--wide is specified?

No.


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?

Yes.



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,

Yes.


> and changing it would not be acceptable because it might
break consumers of this output?

Correct.


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 ?

Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]