gdb.cp/templates.exp, ctor/dtor breakpoints, etc....
Christophe LYON
christophe.lyon@st.com
Mon Jan 19 15:31:00 GMT 2009
On 16.01.2009 18:18, Daniel Jacobowitz wrote:
> On Fri, Jan 16, 2009 at 06:11:08PM +0100, Christophe LYON wrote:
>> Doing this, I follow GCC behaviour, but I get a regression. If we don't
>> consider this a GCC bug, it means that the way GDB recognizes ctor/dtor
>> (any probably any overloaded function) is to be revisited? Am I right?
>
> Yes, all of the name recognition stuff is broken. We shouldn't be
> relying on mangled names, since there are compilers we can not change
> as easily as GCC or yours that do not emit them.
>
Well, currently the gdb.cp/templates.exp is still KFAIL, so I guess the
decision was that GCC should not output mangled names (somewhat
confirmed by
http://gcc.gnu.org/ml/gcc/2001-12/msg00260.html).
But... if GDB does not rely on mangled names, how is it supposed to find
the right template instantiation when trying to set a breakpoint on a
function? For instance in templates.exp, where the T5 template is
defined, how to find the T5<int> ctor, if all the ctor instantiations
are named "T5" ? Should GDB analyse all the type definition in
.debug_info and find the right type?
Christophe.
More information about the Gdb
mailing list