From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13123 invoked by alias); 12 Feb 2008 02:12:21 -0000 Received: (qmail 13114 invoked by uid 22791); 12 Feb 2008 02:12:20 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Feb 2008 02:12:01 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 2B30A98036; Tue, 12 Feb 2008 02:11:59 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id EFB869801D; Tue, 12 Feb 2008 02:11:58 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JOkcm-00046d-7e; Mon, 11 Feb 2008 21:11:56 -0500 Date: Tue, 12 Feb 2008 02:12:00 -0000 From: Daniel Jacobowitz To: Aleksandar Ristovski Cc: gdb-patches@sourceware.org Subject: Re: [patch] Do not add partial_symbol again and again to the list Message-ID: <20080212021156.GA15744@caradoc.them.org> Mail-Followup-To: Aleksandar Ristovski , gdb-patches@sourceware.org References: <20080211203809.GA29560@caradoc.them.org> <47B0B56F.4010607@qnx.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47B0F16B.9090308@qnx.com> User-Agent: Mutt/1.5.17 (2007-12-11) 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/msg00194.txt.bz2 On Mon, Feb 11, 2008 at 08:07:55PM -0500, Aleksandar Ristovski wrote: > struct dwarf2_cu has a pointer to struct objfile, which (if I'm not > mistaken) get's allocated per compilation unit. That's where your confusion is. An objfile is something like "/lib/libc.so.6", a linked file. A compilation unit is something like "init.o", a single "gcc -c" output. Look at how n_static_syms is set in dwarf2read.c to see how multiple psymtabs, for different CUs, share the same static_psymbols list. >>> Not sure if it is a valid indicator but I didn't have any regressions >>> in 'make check'. >> >> Yeah, I think I could write some testcases that were affected by this, >> but I'm not sure. It's tricky because if something else causes the >> full symtab to load, the problem won't appear. > > Yes, that is the tricky part. We want lookup by symbol name to occur in > order to test this. Maybe adding a maintenance command that would > explicitly lookup a partial symbol by name? The trick for writing testcases is to not stop in the second file or "list" it or set a breakpoint in it; any of those things will load the symtab. -- Daniel Jacobowitz CodeSourcery