This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH 5/5] addr2line: Add --pretty-print option to show all information on one line.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 21 May 2015 16:01:17 +0200
- Subject: Re: [PATCH 5/5] addr2line: Add --pretty-print option to show all information on one line.
On Wed, 2015-05-20 at 11:28 -0700, Roland McGrath wrote:
> If we're starting to aim for compatibility with binutils, then perhaps we
> should change -p to match. I think having only --pid would be OK.
I admit that was my goal at first, but there are just too many minor
I made sure the output of --pretty-print matches that of binutils
addr2line, but in the none pretty case there are still differences. We
expand the inlines on the first line, binutils only shows the function
symbol with -i. bintuils always prints line table flags, we only with
--flags (and then we do print statements, but binutils seems to ignore
them), we handle symbols as input, binutils doesn't, etc. eu-addr2line
also has many more options and handles separate debuginfo, processes,
core files, maps, etc.
And binutils addr2line doesn't seem to have any test cases so it is hard
to know whether there are other differences or that binutils addr2line
will keep consistent (for this patch series I generated new tests for
eu-addr2line, where possible using binutils addr2line for the expected
Since other elfutils tools do support --pid, -p and it is handled by
dwfl_standard_argp () I rather keep the elfutils tools consistent than
adjust just this one short option for this one utility.
> > + printf ("%s%s", symname (name), pretty ? " " : "\n");
> Use %c. Several other instances below.
Fixed 5 times.
> > + name = (name != NULL) ? symname (name) : "??";
> No need for parens.