From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22790 invoked by alias); 26 Nov 2012 19:14:38 -0000 Received: (qmail 22782 invoked by uid 22791); 26 Nov 2012 19:14:37 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Nov 2012 19:14:29 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Td48R-0001so-Pa from Ali_Anwar@mentor.com ; Mon, 26 Nov 2012 11:14:27 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 26 Nov 2012 11:14:27 -0800 Received: from [137.202.157.121] (147.34.91.1) by SVR-ORW-FEM-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server (TLS) id 14.1.289.1; Mon, 26 Nov 2012 11:14:25 -0800 Message-ID: <50B3BF10.7070508@codesourcery.com> Date: Mon, 26 Nov 2012 19:14:00 -0000 From: ali_anwar User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: Jan Kratochvil CC: , Subject: Re: warning: RTTI symbol not found for class References: <50AD181E.1050607@codesourcery.com> <20121121183212.GA30560@host2.jankratochvil.net> In-Reply-To: <20121121183212.GA30560@host2.jankratochvil.net> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00683.txt.bz2 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< #include > 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 = { >> =, _vptr.basic_ostream = 0x0} > > ( 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