From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20142 invoked by alias); 12 Feb 2008 15:54:29 -0000 Received: (qmail 20131 invoked by uid 22791); 12 Feb 2008 15:54:29 -0000 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO qnxmail.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Feb 2008 15:54:06 +0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.42.96.5]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id KAA25481; Tue, 12 Feb 2008 10:39:23 -0500 Received: from [10.42.100.129] (dhcp-100-129 [10.42.100.129]) by smtp.ott.qnx.com (8.8.8/8.6.12) with ESMTP id KAA24772; Tue, 12 Feb 2008 10:54:04 -0500 Message-ID: <47B1C11C.6060101@qnx.com> Date: Tue, 12 Feb 2008 15:54:00 -0000 From: Aleksandar Ristovski User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sourceware.org Subject: Re: [patch] Do not add partial_symbol again and again to the list References: <20080211210935.GA31767@caradoc.them.org> <47B0C0F4.4090302@qnx.com> <20080211214750.GA1953@caradoc.them.org> <47B0C7C6.9090605@qnx.com> <20080211223056.GA3833@caradoc.them.org> <47B0CF8A.6080306@qnx.com> <20080211225314.GA5832@caradoc.them.org> <47B0F16B.9090308@qnx.com> <20080212021156.GA15744@caradoc.them.org> <47B12FF9.8080106@qnx.com> <20080212132554.GA4978@caradoc.them.org> In-Reply-To: <20080212132554.GA4978@caradoc.them.org> 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: 2008-02/txt/msg00201.txt.bz2 Daniel Jacobowitz wrote: > On Tue, Feb 12, 2008 at 12:34:49AM -0500, Aleksandar Ristovski wrote: >> What happens with the patch is that for an objfile, we will add global >> type information only once, in the first partial symbol table where the >> symbol was encountered. I think this will be fine. Type info will not have >> address associated and all information we can get about it will be there. >> Finding the first matching partial symbol for a type symbol is as good as >> finding the second or N-th partial symbol for that type (and domain). > > Types are not (in C) global. They're file-static. We need to know > which types are present in each file, because they may have different > definitions in each file. > > The psymbols for two types with the same name will be the same. But > the full symbols may be different. > Yes, you are correct. The patch should not filter out duplicate static symbols, they should stay. Something like this: (in add_psymbol_to_list) /* Filter out duplicate global symbols for c++ only. */ if (language == language_cplus && list == objfile->global_psymbols && !added) return psym;