Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: ali_anwar <ali_anwar@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: <gdb-patches@sourceware.org>, <keiths@redhat.com>
Subject: Re: warning: RTTI symbol not found for class
Date: Mon, 26 Nov 2012 19:14:00 -0000	[thread overview]
Message-ID: <50B3BF10.7070508@codesourcery.com> (raw)
In-Reply-To: <20121121183212.GA30560@host2.jankratochvil.net>

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


  reply	other threads:[~2012-11-26 19:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21 18:08 ali_anwar
2012-11-21 18:32 ` Jan Kratochvil
2012-11-26 19:14   ` ali_anwar [this message]
2012-11-26 19:23     ` Tom Tromey
2012-11-26 20:47       ` ali_anwar
2012-11-26 20:53         ` ali_anwar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50B3BF10.7070508@codesourcery.com \
    --to=ali_anwar@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=keiths@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox