warning: RTTI symbol not found for class

Jan Kratochvil jan.kratochvil@redhat.com
Wed Nov 21 18:32:00 GMT 2012


Hello Ali,

On Wed, 21 Nov 2012 19:06:22 +0100, ali_anwar wrote:
> While debugging a cpp demo (containing the std::cout call) when I
> issue "p std::cout", I get following warning: "warning: RTTI symbol
> not found for class 'std::ostream'".

I do not have it reproducible.  When you have not provided a GDB testcase
could you at least provide OS and a reproducer there?  This way the patch does
not fix anything to me.

Fedora 18 x86_64
GNU gdb (GDB) 7.5.50.20121120-cvs
cat >cout.C <<HERE
#include <iostream>
int main () { std::cout << "foo" << std::endl; }
HERE
g++ -o cout cout.C -Wall -g
gdb -q ./cout -ex start -ex 'p std::cout' -ex c -ex q
$1 = {<std::basic_ios<char, std::char_traits<char> >> = <invalid address>, _vptr.basic_ostream = 0x0}

(<invalid address> does not look great but this patch does not fix it)


> Do we have any fix for this issue if not then is it ok to have this
> work around until we get a proper fix?

It has a regression:

-PASS: gdb.cp/bs15503.exp: print s.length()
-PASS: gdb.cp/bs15503.exp: print s[0]
-PASS: gdb.cp/bs15503.exp: print s[s.length()-1]
+FAIL: gdb.cp/bs15503.exp: print s.length()
+FAIL: gdb.cp/bs15503.exp: print s[0]
+FAIL: gdb.cp/bs15503.exp: print s[s.length()-1]
-PASS: gdb.cp/bs15503.exp: print (const char *) s.substr(0,4)
-PASS: gdb.cp/bs15503.exp: print (const char *) (s=s.substr(0,4))
+FAIL: gdb.cp/bs15503.exp: print (const char *) s.substr(0,4)
+FAIL: gdb.cp/bs15503.exp: print (const char *) (s=s.substr(0,4))


It has also a second regression but I understand that can be ignored as it
just tests what you have changed:

-PASS: gdb.cp/no-dmgl-verbose.exp: DMGL_VERBOSE-demangled f(std::string) is not defined
+FAIL: gdb.cp/no-dmgl-verbose.exp: DMGL_VERBOSE-demangled f(std::string) is not defined


I do not find the patch finished for a review when it still regresses.

(It regresses on Fedora 18 x86_64 in the case it does not regress for you.)


Thanks,
Jan



More information about the Gdb-patches mailing list