This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] mangled names for addr2line -i
- From: Daniel Jacobowitz <drow at false dot org>
- To: James E Wilson <wilson at specifix dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 20 Sep 2005 16:48:47 -0400
- Subject: Re: [patch] mangled names for addr2line -i
- References: <1127239923.21335.13.camel@aretha.corp.specifix.com>
On Tue, Sep 20, 2005 at 11:12:04AM -0700, James E Wilson wrote:
> The new addr2line -i feature added by Fred Fish, which prints info about
> inline function scopes, is not using the mangled names for inline C++
> functions.
>
> The solution is pretty easy. The new function
> find_abstract_instance_name needs to look at and use the
> DW_AT_MIPS_linkage_name attributes. The fix here is to copy the code
> already used in scan_unit_for_symbols to set func->name.
FYI, I will take great pleasure in breaking this again someday.
Probably not for at least a year though.
The DW_AT_MIPS_linkage_name attributes are basically redundant with
the rest of GCC's debug information. I have patches to work without
them, which are necessary for any other modern DWARF-producing compiler
that doesn't generate the linkage name in the debug information. To
work out the demangled name you need to reconstruct it from enclosing
scopes and argument types.
In addition to being redundant, they're huge. The last time I checked
they were larger than the rest of the debug info combined for a typical
C++ program. If there is such a thing as a typical C++ program.
The patch is still safe, of course.
--
Daniel Jacobowitz
CodeSourcery, LLC