This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: dwarflint versus linkage_name attributes
- From: Dodji Seketeli <dodji at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 05 Apr 2011 11:26:29 +0200
- Subject: Re: dwarflint versus linkage_name attributes
Roland McGrath <roland@hack.frob.com> writes:
>> That [though I am not sure if GDB supports the evaluation of "new t"
>> yet], or "break t::t".
>
> But that's not the name of the function!
> You can't refer to it that way in C++, can you?
The C++ says at [class.ctor]/1:
"Constructors do not have names".
At [class.ctor]/2, it goes further saying:
"Because constructors do not have names, they are never found during
name lookup;"
So, pedantically, I agree with you that you can never look a constructor
up by saying "t::t" in a C++ program. Yet practically, when you use the
debugger you may want to be able to break into the constructor of a
given type.
Thus my understanding is that "t::t" in "break t::t" is not the name of
the constructor for C++ lookup purposes, but rather a kind of syntactic
shortcut meaning "the constructors of the type t".
Maybe "break --constructors-of <type>" would have been clearer.
--
Dodji