[Dwarf-discuss] DW_AT_MIPS_linkage_name

Chris Quenelle Chris.Quenelle
Thu Mar 24 16:18:04 GMT 2005

I notice that g++ will emit the linkage name
for declaractions of some kinds of symbols.
(The symbols I'm looking at are all C++ symbols
with mangled linker names.)

I'm considering the same thing for the Sun compilers
because it makes it easier for the debugger to match
up the declaration with other declarations and definitions
of member functions and variables.

Has this issue been raised before?

Should we add a new attribute in the standard
part of the attribute namespace for recording the
linkage name of a symbol?

I think you could get by without it, if you were
willing to merge type information in the debugger
by doing a complete node-wise comparison of the whole
type tree.  The debugger guy I am working with
is resisting that idea.  :-)  It's easier to just
compare two linker names to see if they represent
the same C++ symbol.


For a definition, we can just put in the DW_AT_low_pc
attribute, and insert the address into the dwarf info.
But for a declaration, the symbol might not
end up getting defined in the a.out.  I wonder if we
could add "weak" references to the linker name
in a declaraction, and hence put either "0" or the address
into the declaration die.  Then the debugger can
always look the address up in the symbol table if it wants to.

Some C++ mangled names are VERY long.  I hate to record them
in dwarf and the ELF string table both.


More information about the Dwarf-discuss mailing list