This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: DWARF-2 and constructors/destructors
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gcc at gcc dot gnu dot org, Daniel Berlin <dan at cgsoftware dot com>
- Date: Wed, 5 Dec 2001 23:01:20 -0500
- Subject: Re: DWARF-2 and constructors/destructors
- References: <20011205225246.A10961@nevyn.them.org>
On Wed, Dec 05, 2001 at 10:52:46PM -0500, Daniel Jacobowitz wrote:
> 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. This isn't, of course, present for
> constructors/destructors, since the entry in the class definition is
> for the abstract version.
>
> Is it reasonable for the debugger to have to mangle this itself? The
> constructor arguments can be arbitrarily complex. Should there be
> references in the debug information to the base and complete
> constructors anywhere?
And I see, in a rather memorable rant, Daniel Berlin saying that
DW_AT_MIPS_linkage_name is "a hack" (certainly), "not necessary, and
we're trying to make it go away anyway." Dan, would you mind
enlightening me on how to cope without it without having a full mangler
for every supported C++ ABI attached to the Dwarf-2 reader?
As far as I'm concerned, GDB has no business ever mangling a single
string. Debug info should provide everything that we need.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer