Bug 15204 - dwz causes addr2line to spew out errors
Summary: dwz causes addr2line to spew out errors
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.23
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-27 01:32 UTC by Andy Lutomirski
Modified: 2014-03-31 21:29 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Lutomirski 2013-02-27 01:32:42 UTC
I took a copy of libtcmalloc.so (r190, built unmodified from sources) and named it orig.so.  I can do this with it:

$ addr2line -e orig.so 0x00000000000247b8
/home/luto/apps/gperftools/src/central_freelist.cc:283
$ cp orig.so dwz.so
$ dwz dwz.so 
$ addr2line -e dwz.so 0x00000000000247b8
BFD: Dwarf Error: Could not find abbrev number 91.
BFD: Dwarf Error: Could not find abbrev number 111.
BFD: Dwarf Error: Could not find abbrev number 91.
BFD: Dwarf Error: Offset (7632208) greater than or equal to .debug_str size (281777).
BFD: Dwarf Error: Could not find abbrev number 101.
BFD: Dwarf Error: Could not find abbrev number 113.
<path>/gperftools/src/central_freelist.cc:283

orig.so and dwz.so are here: http://web.mit.edu/luto/www/binutils_bug/

My version of dwz is dwz-0.8-1.fc18.  I've tested this with binutils-2.23.51.0.9 and F18's binutils.  I've also tried dwz 0.9 with similar results.
Comment 1 Gregory Fong 2014-03-12 22:54:43 UTC
This should be fixed by 

2014-01-28  Nick Clifton  <nickc@redhat.com>

       * dwarf2.c (find_abstract_instance_name): For DW_FORM_ref_addr
       attributes select the CU containing the abbreviation, which may not
       be the current CU.

gitweb link: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=0a9c7b2bf1903322a9b03d76c9c171bcd2ad3cf0

"addr2line -e orig.so 0x00000000000247b8" seems to work for me with this change.  Can you please verify that it works for you?
Comment 2 Andy Lutomirski 2014-03-12 22:56:59 UTC
It works for me.
Comment 3 Gregory Fong 2014-03-31 21:29:17 UTC
Fixed by previous change as mentioned above in https://sourceware.org/bugzilla/show_bug.cgi?id=15204#c1