* Patch for addr2line to add one line printing
@ 2003-03-05 21:02 reinhard.jessich
2003-03-05 22:19 ` Robert Schiele
0 siblings, 1 reply; 2+ messages in thread
From: reinhard.jessich @ 2003-03-05 21:02 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
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.
Best Regards,
Reinhard
PS: If someone likes to reply, I am not on the list.
Please mail it directly to me.
--
Ing. Reinhard Jessich mailto: reinhard.jessich@telering.at
A-1190 Vienna, Goergengasse 2/2/1 phone: +43/1/3692600
http://members.telering.at/jessich mobile: +43/664/1735439
[-- Attachment #2: binutils-2.13.2.1-patch.gz --]
[-- Type: application/x-gzip, Size: 1261 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch for addr2line to add one line printing
2003-03-05 21:02 Patch for addr2line to add one line printing reinhard.jessich
@ 2003-03-05 22:19 ` Robert Schiele
0 siblings, 0 replies; 2+ messages in thread
From: Robert Schiele @ 2003-03-05 22:19 UTC (permalink / raw)
To: reinhard.jessich; +Cc: binutils
[-- Attachment #1: Type: text/plain, Size: 887 bytes --]
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
[-- Attachment #2: Type: application/pgp-signature, Size: 481 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-05 22:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-05 21:02 Patch for addr2line to add one line printing reinhard.jessich
2003-03-05 22:19 ` Robert Schiele
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).