From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26476 invoked by alias); 26 Mar 2014 13:32:05 -0000 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 Received: (qmail 26404 invoked by uid 89); 26 Mar 2014 13:32:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 26 Mar 2014 13:32:03 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 572A4116762; Wed, 26 Mar 2014 09:32:01 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vdZPJgmyMRdy; Wed, 26 Mar 2014 09:32:01 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 245E41166A6; Wed, 26 Mar 2014 09:32:01 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 8B85BE07DC; Wed, 26 Mar 2014 06:32:02 -0700 (PDT) Date: Wed, 26 Mar 2014 13:32:00 -0000 From: Joel Brobecker To: Keith Seitz Cc: "gp >> \"gdb-patches@sourceware.org ml\"" Subject: Re: [RFA] Fix c++/16253 (tag/variable name collision) Message-ID: <20140326133202.GQ4282@adacore.com> References: <532C810F.7010809@redhat.com> <20140324141527.GM4282@adacore.com> <5331BB0D.4010606@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5331BB0D.4010606@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-03/txt/msg00613.txt.bz2 > In this case, add_nonlocal_symbols is calling the qf > map_matching_symbols method which is calling match_partial_symbol. > Since this method now does strict matches against domain, an > explicit check for STRUCT_DOMAIN matches must be added. > > Give this amendment a shot and see how it goes. I suspect there are > probably one or two more places where this occurs. [The easiest > thing to do is audit any function which uses "VAR_DOMAIN".] I was thinking of the very same patch :), and it tested fine. Can you remove the curly braces in the second call? They should be unnecessary in this case, and our CS asks us to avoid them in that situation (the only exception is when the body also contains a comment). Thanks! > + { > + objfile->sf->qf->map_matching_symbols (objfile, name, domain, global, > + aux_add_nonlocal_symbols, > + &data, wild_match, NULL); > + if (domain == VAR_DOMAIN) > + { > + objfile->sf->qf->map_matching_symbols (objfile, name, > + STRUCT_DOMAIN, global, > + aux_add_nonlocal_symbols, > + &data, wild_match, NULL); > + } > + } > else > - objfile->sf->qf->map_matching_symbols (objfile, name, domain, global, > - aux_add_nonlocal_symbols, &data, > - full_match, compare_names); > + { > + objfile->sf->qf->map_matching_symbols (objfile, name, domain, global, > + aux_add_nonlocal_symbols, > + &data, full_match, > + compare_names); > + if (domain == VAR_DOMAIN) > + { > + objfile->sf->qf->map_matching_symbols (objfile, name, > + STRUCT_DOMAIN, global, > + aux_add_nonlocal_symbols, > + &data, full_match, > + compare_names); > + } > + } > } > > if (num_defns_collected (obstackp) == 0 && global && !is_wild_match) -- Joel