From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69888 invoked by alias); 30 Jan 2016 13:50:26 -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 69870 invoked by uid 89); 30 Jan 2016 13:50:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Doug, evans, embarrassed X-HELO: mail-wm0-f66.google.com Received: from mail-wm0-f66.google.com (HELO mail-wm0-f66.google.com) (74.125.82.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 30 Jan 2016 13:50:24 +0000 Received: by mail-wm0-f66.google.com with SMTP id 128so2050620wmz.3 for ; Sat, 30 Jan 2016 05:50:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=6vnhQbOCUUNBpraJHYUvnN8uFdtFuoqxsIR6qM53xA0=; b=X4RgRSQgN2w6IOKK0zb2ks1IMDR7WjxlWaYEk7pwGC98u3OURijsA1qlZby5x67Hd9 G9sBjTBIcHi7uSI+80ourJa4KWkjhqKm/edGWeh5zM+vdUPJ1fOZnUBQuM0K7+GNG/Yw f26FHWEOt81xOynIo5o6S+X2wK+Rc5nl2ZfZ9YiCCIgt3c9G9HHRKzPKfm6TnBjfWtNc BdAV96LqeMiswUT9akTFR2nVqT5n0ljcQP6E6NDbcG1Wv59QS2K0TxOGO/biRzpHIewY 3T/9QLBLdclxNLV+5da1h8dLvtwYHUCQTiVuYwSNdljb5ycId1wbP2a04AYYBl2R1XdQ N4Kg== X-Gm-Message-State: AG10YOS73QDjAO3UfHPf7tTxbVKNk8Iszl+HOSdWyhqc4gjQvjF0jrsMb4jFidfERkrHUdfxn1UXAy/Afr8psQ== MIME-Version: 1.0 X-Received: by 10.194.82.36 with SMTP id f4mr14978202wjy.87.1454161821197; Sat, 30 Jan 2016 05:50:21 -0800 (PST) Received: by 10.28.211.1 with HTTP; Sat, 30 Jan 2016 05:50:21 -0800 (PST) In-Reply-To: References: <56250F4F.7050908@redhat.com> <86mvv6cwk3.fsf@sspiff.org> Date: Sat, 30 Jan 2016 13:50: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: 2016-01/txt/msg00728.txt.bz2 On 29 October 2015 at 16:32, Iain Buclaw wrote: > 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. [Apologies for the necromancing] I've managed to finally get round to producing a reduced DWARF test for 1/2 in this series. However I'm not able to produce one for this, as it's just a refactor of dead code. Iain.