can't find class named `foo', as given by C++ RTTI

Benjamin Kosnik
Wed Jun 27 21:55:00 GMT 2001

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 {
    size_t _M_references;

    virtual ~facet();
    virtual ~facet();
    void <badly mangled name '_S_create_c_locale__5facet_ZNSt6locale5facet18_S_create_c_localeERP15__locale_structPKc'>;
    void <badly mangled name '_S_destroy_c_locale__5facet_ZNSt6locale5facet19_S_destroy_c_localeERP15__locale_struct'>;
    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/, 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/
#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/
#3  0x08096ea9 in std::locale::locale(char const*) (this=0xbffff870, 
    __s=0x80d5c4c "fr_FR")
    at /mnt/hd/bliss/src.gcc/libstdc++-v3/src/
#4  0x0804888c in test02() () at 22_locale/
#5  0x080492bc in main () at 22_locale/
#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



More information about the Gdb mailing list