From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11148 invoked by alias); 31 Aug 2006 12:09:36 -0000 Received: (qmail 11135 invoked by uid 22791); 31 Aug 2006 12:09:35 -0000 X-Spam-Check-By: sourceware.org Received: from mailgw2.technion.ac.il (HELO mailgw2.technion.ac.il) (132.68.238.33) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 31 Aug 2006 12:09:34 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgw2.technion.ac.il (Postfix) with ESMTP id ABCCD3904A1; Thu, 31 Aug 2006 15:09:31 +0300 (IDT) Received: from mailgw2.technion.ac.il ([127.0.0.1]) by localhost (mailgw2.technion.ac.il [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xHXYJTou04r8; Thu, 31 Aug 2006 15:09:31 +0300 (IDT) Received: from techunix.technion.ac.il (techunix.technion.ac.il [132.68.1.28]) by mailgw2.technion.ac.il (Postfix) with ESMTP id 8496539047D; Thu, 31 Aug 2006 15:09:16 +0300 (IDT) Received: from [127.0.0.1] (techunix.technion.ac.il [132.68.1.28]) by techunix.technion.ac.il (Postfix) with ESMTP id 414DD14B72; Thu, 31 Aug 2006 15:09:16 +0300 (IDT) (envelope-from mveksler@tx.technion.ac.il) Message-ID: <44F6D16B.7090001@tx.technion.ac.il> Date: Thu, 31 Aug 2006 12:09:00 -0000 From: Michael Veksler User-Agent: Thunderbird 1.5.0.5 (X11/20060726) MIME-Version: 1.0 To: Frederic RISS Cc: gdb@sourceware.org, GDB Patches Subject: Re: Get versioned minsyms from dynamic symtab (Was: Re: How to call operator<< functions?) 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> In-Reply-To: <1157024034.3429.303.camel@crx549.cro.st.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00272.txt.bz2 Frederic RISS wrote: > On Linux, versioned ELF symbols are stored in the static symtab with an > (@)@VERSION suffix. We store such symbols with the suffix and thus fail > to find them when looking up the real name. > > This causes failures such as the one described here: > http://www.sourceware.org/ml/gdb/2006-08/msg00244.html > > In the general case, GDB doesn't use the dynamic symtab because it > contains usually only a subset of the static table information. The > attached patch make GDB store dynamic versioned symbols. > > Maybe this is harvests too much symbols, and we should limit it to the > dynamic symbols of the main executable. It's easy enough to do, we just > need to pass the 'mainline' flag to elf_symfile_read from > elf_symtab_read. > > I've no idea if this could break something on non-Linux platforms, I've > just tested on x86-linux. > > I'm also attaching a little testsuite patch that fails for me on current > GDB and works with the patch. > > Opinions? > Great, now std::cout does not cause crashes. Still there is the problem of (gdb) p std::cout $1 = But that's unrelated, right? The problem with this result is that it sometimes confuses GDB as described at the end of: http://sources.redhat.com/ml/gdb/2006-08/msg00271.html Michael