From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11751 invoked by alias); 29 Oct 2015 15:32:23 -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 11738 invoked by uid 89); 29 Oct 2015 15:32:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wm0-f45.google.com Received: from mail-wm0-f45.google.com (HELO mail-wm0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 29 Oct 2015 15:32:20 +0000 Received: by wmec75 with SMTP id c75so26891867wme.1 for ; Thu, 29 Oct 2015 08:32:17 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.28.131.11 with SMTP id f11mr7142825wmd.59.1446132737460; Thu, 29 Oct 2015 08:32:17 -0700 (PDT) Received: by 10.27.93.5 with HTTP; Thu, 29 Oct 2015 08:32:17 -0700 (PDT) In-Reply-To: <86mvv6cwk3.fsf@sspiff.org> References: <56250F4F.7050908@redhat.com> <86mvv6cwk3.fsf@sspiff.org> Date: Thu, 29 Oct 2015 17:10:00 -0000 Message-ID: Subject: Re: [PATCH 2/2] [D] Remove search_parents parameter from d_lookup_symbol_imports From: Iain Buclaw To: Doug Evans Cc: Pedro Alves , GDB Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00699.txt.bz2 On 26 October 2015 at 01:17, Doug Evans wrote: >> 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. > > Would the testsuite's DWARF assembler help here? > IOW, write the test in DWARF, not D. Yes, that too, it's just a process that I can foresee taking a while to get right. Iain.