From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Berlin To: Jim Blandy Cc: Benjamin Kosnik , gdb@sources.redhat.com Subject: Re: can't find class named `foo', as given by C++ RTTI Date: Fri, 29 Jun 2001 11:20:00 -0000 Message-id: <87pubni1w7.fsf@cgsoftware.com> References: <200106280455.f5S4t6T07564@fillmore.constant.com> X-SW-Source: 2001-06/msg00241.html Jim Blandy writes: > Benjamin Kosnik writes: >> 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', as given by C++ RTTI > > This means is that GDB wanted to find the run-time type of some object > (probably *__fp), and failed. Here's how GDB tries to find an > object's run-time type: > - GDB extracts the object's vtable. > - it looks up the linker symbol naming the vtable (which was > _ZTVSt8numpunct, or something like that). > - it demangles that name (and got "vtable for std::numpunct") > - it pulls off the "vtable for " part > - it tries to look up the type name (in this case, "std::numpunct") in > its full symbol table > > In this case, GDB wasn't able to find the name std::numpunct. > > Probably GDB should have been able to find std::numpunct. But does > the rest of the process look reasonable? That is, was the run-time > type of *__fp indeed `std::numpunct'? The output from `ptype' > suggests that its compile-time type is `class facet'. Perhaps > something went wrong well before we ever tried to look up the type > name. Nope. The name of the type in the symbol table is numpunct, because of scoping problems. -- "A friend of mine once sent me a post card with a picture of the entire planet Earth taken from space. On the back it said, "Wish you were here." "-Steven Wright