This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] [D] Remove search_parents parameter from d_lookup_symbol_imports
- From: Iain Buclaw <ibuclaw at gdcproject dot org>
- To: Doug Evans <xdje42 at gmail dot com>
- Cc: Pedro Alves <palves at redhat dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Date: Sat, 30 Jan 2016 14:50:21 +0100
- Subject: Re: [PATCH 2/2] [D] Remove search_parents parameter from d_lookup_symbol_imports
- Authentication-results: sourceware.org; auth=none
- References: <CABOHX+dAvESSm0gHL4vvwX4JuoZhiy+uac6hSirQ6c35Da0_SQ at mail dot gmail dot com> <56250F4F dot 7050908 at redhat dot com> <CABOHX+ew_AL+kXWHOJKGNQ=aP=fQwva7Kkywo_1UC+OcJntyeQ at mail dot gmail dot com> <86mvv6cwk3 dot fsf at sspiff dot org> <CABOHX+c+8AJvAWzrCTpJcEHu_CU08XaP1zN9=2azVuhV9jH3WA at mail dot gmail dot com>
On 29 October 2015 at 16:32, Iain Buclaw <ibuclaw@gdcproject.org> wrote:
> On 26 October 2015 at 01:17, Doug Evans <xdje42@gmail.com> wrote:
>>> On 19 October 2015 at 17:42, Pedro Alves <palves@redhat.com> 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.