This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
can't find class named `foo', as given by C++ RTTI
- To: gdb at sources dot redhat dot com
- Subject: can't find class named `foo', as given by C++ RTTI
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Wed, 27 Jun 2001 21:55:06 -0700
This is a new class of errors that I've started seeing recently. I'm
getting this from debugging efforts on x86/linux with current CVS
'src' and 'gcc' modules. For what it's worth, both --with-dwarf2 and
default toolchains have the same error.
(gdb) p *__fp
can't find class named `std::numpunct<char>', as given by C++ RTTI
(gdb) ptype __fp
type = class facet {
private:
size_t _M_references;
protected:
facet(unsigned);
facet(unsigned);
~facet();
virtual ~facet();
virtual ~facet();
static
void <badly mangled name '_S_create_c_locale__5facet_ZNSt6locale5facet18_S_create_c_localeERP15__locale_structPKc'>;
static
void <badly mangled name '_S_destroy_c_locale__5facet_ZNSt6locale5facet19_S_destroy_c_localeERP15__locale_struct'>;
private:
void _M_add_reference();
void _M_remove_reference();
facet(std::locale::facet const&);
facet(std::locale::facet const&);
void operator=(std::locale::facet const&);
}
Of course, the 'badly mangled name' bits are a bit disconcerting as well.
This is from libstdc++-v3/testsuite/22_locale/members.cc, line 73
I step into this function:
locale loc_fr("fr_FR");
As so:
(gdb) where
#0 std::locale::_Impl::_M_install_facet(std::locale::id const*, std::locale::facet*) (this=0x810a488, __idp=0x8107b20, __fp=0x810a5e0)
at /mnt/hd/bliss/src.gcc/libstdc++-v3/src/localename.cc:196
#1 0x080b37b8 in void std::locale::_Impl::_M_init_facet<std::numpunct<char> >(std::numpunct<char>*) (this=0x810a488, __facet=0x810a5e0)
at /mnt/hd/bliss/src.gcc/libstdc++-v3/include/bits/localefwd.h:365
#2 0x0809b994 in std::locale::_Impl::_Impl(std::string, unsigned) (
this=0x810a488, __str=0xbffff680, __refs=1)
at /mnt/hd/bliss/src.gcc/libstdc++-v3/src/localename.cc:103
#3 0x08096ea9 in std::locale::locale(char const*) (this=0xbffff870,
__s=0x80d5c4c "fr_FR")
at /mnt/hd/bliss/src.gcc/libstdc++-v3/src/locale.cc:376
#4 0x0804888c in test02() () at 22_locale/members.cc:73
#5 0x080492bc in main () at 22_locale/members.cc:136
#6 0x0804d412 in __libc_start_main (main=0x80492ac <main>, argc=1,
ubp_av=0xbffff964, init=0x80480b4 <_init>, fini=0x80d5c20 <_fini>,
rtld_fini=0, stack_end=0xbffff95c) at ../sysdeps/generic/libc-start.c:129
??
-benjamin