Some eu-addr2line improvements

Mark Wielaard mjw at redhat.com
Wed May 20 14:35:42 UTC 2015


Hi,

eu-addr2line is mostly nicer to use than binutils addr2line IMHO,
because it can work with symbol offsets, separate debuginfo, pids,
core files, process maps, etc. But binutils addr2line has a couple of
options that are also useful that prevented using eu-addr2line as a drop
in replacement.

This patch set cleans up a few things and adds three new options.

[PATCH 1/5] addr2line: Split options in input and output format
Is a simple cleanup of the --help output.

[PATCH 2/5] addr2line: Always parse addresses as hex numbers.
Matches what binutils addr2line does, which IMHO makes more sense than
trying to parse the input as octal or decimal if we aren't sure they
are hex.

[PATCH 3/5] addr2line: Add -a, --address. Print address before for each entry.
Is even more useful with our implementation since we accept symbol+offset
as input. So this then returns what address that really translates to.

[PATCH 4/5] addr2line: Add demangler support.
Implemented as was done for eu-stack and eu-nm earlier.

[PATCH 5/5] addr2line: Add --pretty-print option
A more compact output format that is easier to parse.

A couple of testcases were added. All patches can also be found on the
mjw/addr2line git branch.

Cheers,

Mark


More information about the elfutils-devel mailing list