Patch for addr2line to add one line printing
Robert Schiele
rschiele@uni-mannheim.de
Wed Mar 5 22:19:00 GMT 2003
On Wed, Mar 05, 2003 at 09:12:23PM +0100, reinhard.jessich@telering.at wrote:
> I needed a tool to convert the addresses of a stack backtrace to function names.
> addr2line is the right tool to do this, but the output is not optimal for a
> backtrace.
>
> I added an option (-o) to print the result in one line. Then I found this could
> be usefull for others, too.
>
> Attached is a patch, which adds the -o option.
Why adding obscure options for special cases, when the same results
can be achieved by a simple awk script like:
addr2line -Cfse executable addr1 addr2 addr3 ... | \
awk '{ if (a++ % 2) print b " " $0; else b = $0 }'
In my opinion, a format option, if added, should be more generic, like
the '+' option for the date command.
Robert
--
Robert Schiele Tel.: +49-621-181-2517
Dipl.-Wirtsch.informatiker mailto:rschiele@uni-mannheim.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030305/9bb63bfa/attachment.sig>
More information about the Binutils
mailing list