dwarflint versus linkage_name attributes
Dodji Seketeli
dodji at redhat.com
Tue Apr 5 09:26:29 UTC 2011
Roland McGrath <roland at 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
More information about the elfutils-devel
mailing list