This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DWARF-2 and constructors/destructors


>>>>> "Daniel" == Daniel Jacobowitz <dmj+@andrew.cmu.edu> writes:

> Suppose you want to call a (non-virtual) method in C++, from something
> with Dwarf-2 info.  The only way to get the mangled name from the debug
> info is DW_AT_MIPS_linkage_name.

As Dan Berlin points out, The mangled name is already in the symbol table,
if there's actually a definition of the method.  Why does it need to be in
the debug info as well?  To call a non-virtual function, we're only
interested in its address.  The debug information doesn't enter into it.

This applies to all functions, of course, not just ctors/dtors.  The
DW_AT_MIPS_linkage_name stuff was a hack to make dwarf2 work with the
existing stabs-oriented code with minimal effort; it would save a lot of
space if we could get rid of it.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]