This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PING: [PATCH v4] fixed inherit_abstract_dies infinite recursive call
- From: Doug Evans <xdje42 at gmail dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: lin zuojian <manjian2006 at gmail dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Tom Tromey <tromey at redhat dot com>, linzj <linzj at ucweb dot com>
- Date: Thu, 20 Feb 2014 09:18:20 -0800
- Subject: Re: PING: [PATCH v4] fixed inherit_abstract_dies infinite recursive call
- Authentication-results: sourceware.org; auth=none
- References: <1390374431-17981-1-git-send-email-manjian2006 at gmail dot com> <20140128120600 dot GG4101 at adacore dot com> <20140210142831 dot GY5485 at adacore dot com> <CAP9bCMSh7VPM2HZ8RYeq+Nhcc78txiqZ9X=t+oaX6d_Zh_f6Uw at mail dot gmail dot com> <20140211021937 dot GD5485 at adacore dot com> <CAP9bCMTw8syKZU=1-EUJsuzw61J9UsR6Lv-hO_C5B_E-Em-1FA at mail dot gmail dot com> <20140213073112 dot GS5485 at adacore dot com> <52FC7BC8 dot 2010400 at gmail dot com> <20140214033411 dot GD5485 at adacore dot com> <m3mwhnvbrk dot fsf at sspiff dot org> <20140219075900 dot GC4270 at adacore dot com>
On Tue, Feb 18, 2014 at 11:59 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> Hi.
>> Sorry for the delay!
>
> No, Thank You for looking into it! :)
>
>> I spent some time looking for a cleverer patch, but in the end I think the
>> simplicity of this patch is nice.
>
> :)
>
>>
>> 2014-02-18 lin zuojian <manjian2006@gmail.com>
>> Joel Brobecker <brobecker@adacore.com>
>> Doug Evans <xdje42@gmail.com>
>>
>> PR symtab/16581
>> * dwarf2read.c (struct die_info): New member in_process.
>> (reset_die_in_process): New function.
>> (process_die): Set it at the start, reset when returning.
>> (inherit_abstract_dies): Only call process_die if origin_child_die
>> not already being processed.
>>
>> testsuite/
>> * gdb.dwarf2/dw2-icycle.S: New file.
>> * gdb.dwarf2/dw2-icycle.c: New file.
>> * gdb.dwarf2/dw2-icycle.exp: New file.
>
> That looks good to me, with one tiny little CS comment (see below).
>
>> +static void
>> +reset_die_in_process (void *arg)
>> +{
>> + struct die_info *die = arg;
>> + die->in_process = 0;
>
> Missing empty line after local variable declaration.
Committed.
[with a small tweak to the testcase (added a comment)]