[RFA] dwarf2_physname

Michael Eager eager@eagercon.com
Tue Sep 1 00:06:00 GMT 2009


Tom Tromey wrote:
>>>>>> "Michael" == Michael Eager <eager@eagercon.com> writes:
> 
> Michael> (http://www.dwarfstd.org/ShowIssue.php?issue=090715.1&type=closed3)
> 
> Michael> There was a significant amount of discussion about whether this was
> Michael> really needed.  There were a couple examples where it might provide
> Michael> information which was not otherwise available or where it compensated
> Michael> for linkers which didn't support weak externs.
> 
> I read that page and didn't see these examples.  Do you know where we
> could find them?

They were raised as part of the DWARF Committee discussions:

1)  Finding the address of the in-charge constructor when evaluating
     "new foo()".
2)  Look up address of Fortran common block.
3)  Demangled to display name of instance of overloaded function.
4)  Compensate for compilers which do not generate adequate DWARF.
5)  Demangle to find fully qualified name for type.
6)  Avoid unresolved external references for symbols which are removed
     by the linker, if weak externs are not supported.
7)  Optimize access with Apple's scheme where DWARF is left in the .o's.

Not all of these examples were compelling, nor did it appear that
DW_AT_linkage_name was the only means for obtaining the desired information.
Some were clearly Quality of Implementation issues, like 4.

> It seems to me that if we can do the job without DW_AT_*linkage_name,
> then all other things being equal that is what we ought to do,
> considering that the new attribute is optional.  In practice this only
> means that we must determine whether all other things actually are
> equal.

Almost all attributes in DWARF are optional.  Leaving out useful ones
only makes it difficult to debug your program.  :-(

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Gdb-patches mailing list