From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23200 invoked by alias); 31 Aug 2006 12:26:29 -0000 Received: (qmail 23190 invoked by uid 22791); 31 Aug 2006 12:26:28 -0000 X-Spam-Check-By: sourceware.org Received: from fra-del-04.spheriq.net (HELO fra-del-04.spheriq.net) (195.46.51.100) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 31 Aug 2006 12:26:24 +0000 Received: from fra-out-03.spheriq.net (fra-out-03.spheriq.net [195.46.51.131]) by fra-del-04.spheriq.net with ESMTP id k7VCQHSX031667 for ; Thu, 31 Aug 2006 12:26:17 GMT Received: from fra-cus-02.spheriq.net (fra-cus-02.spheriq.net [195.46.51.38]) by fra-out-03.spheriq.net with ESMTP id k7VCQHuE027767 for ; Thu, 31 Aug 2006 12:26:17 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-02.spheriq.net with ESMTP id k7VCQGGG019509 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 31 Aug 2006 12:26:17 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A55F0DA44; Thu, 31 Aug 2006 12:26:15 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 97584473FC; Thu, 31 Aug 2006 12:26:14 +0000 (GMT) Received: from crx549.cro.st.com (crx549.cro.st.com [164.129.44.49]) by mail1.cro.st.com (MOS 3.5.8-GR) with ESMTP id CII15255 (AUTH "frederic riss"); Thu, 31 Aug 2006 14:26:12 +0200 (CEST) Subject: Re: Get versioned minsyms from dynamic symtab (Was: Re: How to call operator<< functions?) From: Frederic RISS To: Michael Veksler Cc: gdb@sourceware.org In-Reply-To: <44F6D16B.7090001@tx.technion.ac.il> References: <44F5645F.4000301@tx.technion.ac.il> <1156936373.3429.250.camel@crx549.cro.st.com> <1156944608.3429.275.camel@crx549.cro.st.com> <1157024034.3429.303.camel@crx549.cro.st.com> <44F6D16B.7090001@tx.technion.ac.il> Content-Type: text/plain Date: Thu, 31 Aug 2006 12:26:00 -0000 Message-Id: <1157027172.3429.309.camel@crx549.cro.st.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00274.txt.bz2 On Thu, 2006-08-31 at 15:09 +0300, Michael Veksler wrote: > Great, now std::cout does not cause crashes. Still there is the problem of > > (gdb) p std::cout > $1 = > > But that's unrelated, right? Yes, unrelated. This should work if you've got a version of libstdc++ compiled with debug info. If you don't, then GDB can't find std::cout's type. This works for me once the library is loaded (i.e. once the inferior is running): (gdb) p std::cout $1 = (gdb) ptype std::cout type = struct std::basic_ostream > { } (gdb) start Breakpoint 1 at 0x8048703: file cout.cc, line 11. Starting program: /home/rf23/tmp/cout/a.out main () at cout.cc:11 11 std::cout << "&std::cout is " << &std::cout << std::endl; (gdb) ptype std::cout type = class std::basic_ostream > : public virtual std::basic_ios > { public: void basic_ostream(int, const void **, class std::basic_streambuf > *); protected: void basic_ostream(int, const void **); public: ~basic_ostream(int, const void **); class std::basic_ostream > & operator<<(std::ostream& (*)(std::ostream&)); class std::basic_ostream > & operator<<(std::basic_ios >& (*)(std::basic_ios >&)); class std::basic_ostream > & operator<<(std::ios_base& (*)(std::ios_base&)); class std::basic_ostream > & operator<<(long); class std::basic_ostream > & operator<<(unsigned long); class std::basic_ostream > & operator<<(bool); class std::basic_ostream > & operator<<(short); class std::basic_ostream > & operator<<(unsigned short); class std::basic_ostream > & operator<<(int); class std::basic_ostream > & operator<<(unsigned int); class std::basic_ostream > & operator<<(long long); class std::basic_ostream > & operator<<(unsigned long long); class std::basic_ostream > & operator<<(double); class std::basic_ostream > & operator<<(float); class std::basic_ostream > ---Type to continue, or q to quit---q & operator<<(long douQuit (gdb) q