From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12300 invoked by alias); 30 Apr 2012 20:01:43 -0000 Received: (qmail 12291 invoked by uid 22791); 30 Apr 2012 20:01:42 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 Apr 2012 20:01:29 +0000 Received: by vcbfy7 with SMTP id fy7so2881533vcb.0 for ; Mon, 30 Apr 2012 13:01:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=0XHwx/2QfAz0blspRou+/15DU7a4vdWe4uMqPRfYj1A=; b=KCNyrGA0Wg9F2otgGdI7vXlrh0Sm+J3Dn/zqWwicXQSDjP6AkjR7YyMRZpNZL19oDi u+1gg8ozNWqYlK/5zexV9j6jmItVGpVwISjUqiM4h+QINalPWFaXNj034ELS2O86VRJ6 Psr4tVBhkMOmDnc9FF9icR3q0IQiTivICOWHzAleagT4YET3x1XC3cIyvMczqAjpYJ7v rX32Cri9f/nhHcNcUTXQmrnmGR+euXAYb45KM/n0z+BBqQu8r8ng6eaH95yjLJYnm2K3 KBM4IDcvQwqi8ciZJk7AiTnj8L77Q6ZZi1z+9uvWIz4Z9a3okLYIAtnwLA39Yd1tR5NV Znxg== Received: by 10.52.65.69 with SMTP id v5mr7232616vds.14.1335816087934; Mon, 30 Apr 2012 13:01:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.65.69 with SMTP id v5mr7232611vds.14.1335816087869; Mon, 30 Apr 2012 13:01:27 -0700 (PDT) Received: by 10.52.165.2 with HTTP; Mon, 30 Apr 2012 13:01:27 -0700 (PDT) In-Reply-To: References: <87haw7brks.fsf@fleche.redhat.com> Date: Mon, 30 Apr 2012 21:43:00 -0000 Message-ID: Subject: Re: [3/10] introduce psymtab users From: Doug Evans To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQkXKNqm4xJVEgu/lWLxvfQOtPrbgI5PIqC0e2yS6t7ulp16LlVrlGbsUxWibql1q8YqDvjGhyiwQ6MZD7rKk9wHs6CXSFpPoyIcR+3NpEa6ZkYIHNRDUuZuFRkBYr7Ii/OLbtmIDDI5kKFXUbMvf0F8EVapzA== 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-04/txt/msg01090.txt.bz2 On Mon, Apr 30, 2012 at 11:44 AM, Doug Evans wrote: > On Wed, Apr 25, 2012 at 11:21 AM, Tom Tromey wrote: >> @@ -165,6 +169,11 @@ partial_map_symtabs_matching_filename (struct objfi= le *objfile, >> >> =A0 ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, pst) >> =A0 { >> + =A0 =A0/* We can skip shared psymtabs here, because any file name will= be >> + =A0 =A0 =A0 attached to the unshared psymtab. =A0*/ >> + =A0 =A0if (pst->users !=3D NULL) >> + =A0 =A0 =A0continue; >> + >> =A0 =A0 if (FILENAME_CMP (name, pst->filename) =3D=3D 0 >> =A0 =A0 =A0 =A0|| (!is_abs && compare_filenames_for_search (pst->filenam= e, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 name, name_len))) > > The abstraction feels broken if ALL_OBJFILE_PSYMTABS* includes these > special shared psymtabs. > > [This is akin to the objfile list including separate debug file objfiles.] Actually, I take that back. Looking into something unrelated, I can understand implementing them that way (given the source as it is today). Still, IWBN to have an iterator that did just iterate over the "real" psymt= abs. e.g., have a version of ALL_OBJFILE_PSYMTABS_REQUIRED that skipped shared psymtabs so the caller didn't have to do that.