bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/750] Addr2line reports function name that is inconsistent


From: fnf at specifixinc dot com
Subject: [Bug binutils/750] Addr2line reports function name that is inconsistent with file/line info for C++
Date: 17 Feb 2005 17:39:36 -0000

------- Additional Comments From fnf at specifixinc dot com  2005-02-17 17:39 
-------
(My network connection when down while submitting this bug so some
info didn't make it into the original report)

Previously I submitted a bug report (binutils/629), and a patch which
was accepted, to make the line and function info consistent for
inlined functions.  That patch works for C code, but there are some
additional cases in C++ code that still fail.  For one test case I
have, the current addr2line produces:

  $ ./addr2line -e Test -f 0x804a39f
  main
 
/links/opt-local/sourceware/bin/../lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/ext/mt_allocator.h:450

After applying the patch which I will attach to this bug report, I
get:

  $ ./addr2line -e Test -f 0x804a39f
  _S_get_pool
 
/links/opt-local/sourceware/bin/../lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/ext/mt_allocator.h:450

The code in mt_allocator.h at line 450 looks like:

      static pool_type&
      _S_get_pool()
      {
        static pool_type _S_pool;               <---- This is line 450
        return _S_pool;
      }

The DWARF info has a chain of DIE's that includes a
DW_AT_specification attribute that chains to the DW_TAG_subprogram DIE
that has the right function name:

 <6><480a>: Abbrev Number: 95 (DW_TAG_inlined_subroutine)
     DW_AT_abstract_origin: <3970>
     DW_AT_low_pc      : 0x804a39f
     DW_AT_high_pc     : 0x804a3ac

 <1><3970>: Abbrev Number: 85 (DW_TAG_subprogram)
     DW_AT_sibling     : <39a5>
     DW_AT_specification: <241e>
     DW_AT_inline      : 3      (declared as inline and inlined)

 <2><241e>: Abbrev Number: 70 (DW_TAG_subprogram)
     DW_AT_external    : 1
     DW_AT_name        : (indirect string, offset: 0x5e8): _S_get_pool
     DW_AT_decl_file   : 108
     DW_AT_decl_line   : 448
     DW_AT_MIPS_linkage_name: (indirect string, offset: 0x1333):
_ZN9__gnu_cxx20__common_pool_policyINS_6__poolELb1EE11_S_get_poolEv
     DW_AT_type        : <2467>
     DW_AT_declaration : 1


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=750

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]