R: Improvements in binutils by implementing libaddr2line.a
Nick Clifton
nickc@redhat.com
Fri Sep 7 14:08:00 GMT 2007
Hi Massimo,
[Please keep the CC to the binutils mailing list. Discussions like this
should be held on the public list].
> I don't know how to obtain an FSF copyright assignment from FSF.
I have attached a form to this reply which you can use to start the application
process, should you choose to do so.
> But anyway I did only a few modifications on the addr2line.c file and the
> part I have added/modified has been copied from gnaddr2line.c files found in
> http://www.filewatcher.com/p/binutils-2.15.90-20040222-1-src.tar.gz.14182109
> /binutils-2.15.90-20040222-1/binutils/gnaddr2line.c.html
Hmm, unfortunately there does not appear to be any description of who made
these changes to addr2line.c or why.
> But I agree with you that it is more flexible to insert it in bfd. In this
> manner there isn't one more library and it is strictly correlated with bfd
> library. I think that the procedure will be useful also for all the program
> using execinfo.h.
True, but honestly I do not see what benefit this proposed library function
would have over the already existing bfd_find_nearest_line() function. The
only thing that the translate_address() and convert_address() functions add is
the ability to process more than one address at a time, and that is easily
handled by a simple loop in the caller of bfd_find_nearest_line.
Really is there any benefit to having the proposed convert_address() function
in the bfd library ? I am attaching a version of the prova_bt.c program that
you supplied but edited to use bfd_find_nearest_line instead of
convert_address. The results are pretty much the same in my opinion.
Cheers
Nick
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: future
URL: <https://sourceware.org/pipermail/binutils/attachments/20070907/f8ca22f7/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prova_bt.c
Type: application/x-unknown-content-type-c_auto_file
Size: 2144 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20070907/f8ca22f7/attachment.bin>
More information about the Binutils
mailing list