From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51641 invoked by alias); 23 Oct 2015 20:35:34 -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 51606 invoked by uid 89); 23 Oct 2015 20:35:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f182.google.com Received: from mail-wi0-f182.google.com (HELO mail-wi0-f182.google.com) (209.85.212.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 23 Oct 2015 20:35:32 +0000 Received: by wicfv8 with SMTP id fv8so47093730wic.0 for ; Fri, 23 Oct 2015 13:35:29 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.37.135 with SMTP id y7mr6185018wij.89.1445632529672; Fri, 23 Oct 2015 13:35:29 -0700 (PDT) Received: by 10.27.93.5 with HTTP; Fri, 23 Oct 2015 13:35:29 -0700 (PDT) In-Reply-To: <56250F4F.7050908@redhat.com> References: <56250F4F.7050908@redhat.com> Date: Sun, 25 Oct 2015 11:19:00 -0000 Message-ID: Subject: Re: [PATCH 2/2] [D] Remove search_parents parameter from d_lookup_symbol_imports From: Iain Buclaw To: Pedro Alves Cc: GDB Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00511.txt.bz2 On 19 October 2015 at 17:42, Pedro Alves wrote: > > On 10/11/2015 01:01 PM, Iain Buclaw wrote: > > Whilst looking at part one, a moment of insight came to me and I > > realized this code is completely nonsensical. > > > > For a start, when importing modules, you don't gain access to all > > parent packages of the given module. > > > > To add some confusion, even the comment was wrong. It doesn't even > > cater for the example given (it's d_lookup_symbol_module that walks up > > each block scope). > > > > I feel embarrassed it didn't come to me before. :-) > > The usual penance is writing test cases. :-) > It helps if there is a compiler readily available to compile said tests. However, there likely is a way to get around this that I'm not aware of. (Skip certain tests if a compiler doesn't exist? ;-) With this patch though, it's all dead code. Hard to write a test for something that is unreachable. Regards Iain