This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: warning: RTTI symbol not found for class
On 11/21/2012 11:32 PM, Jan Kratochvil wrote:
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)
I tried it for powerpc-eabi. But following should reproduce the issue in
your scenario as well:
gdb -q ./cout -ex start -ex s -ex fin -ex c -ex q
[snip]
2 int main () { std::cout << "foo" << std::endl; }
Value returned is $1 = warning: RTTI symbol not found for class
'std::ostream'
[snip]
I am on Ubuntu 10.04 32 bit.
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))
I am facing following 6 failures without the proposed change on Ubuntu
10.04 32 bit.
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]
FAIL: gdb.cp/bs15503.exp: print (const char *) s
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))
After applying patch I faced only following 5 issue:
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]
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.)
Let me try on some other machine and verify it.
Thanks,
-Ali