This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Remove pre_expand_symtabs_matching quick_symbol_functions API
- From: Doug Evans <dje at google dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>, Tom Tromey <tromey at redhat dot com>, Cary Coutant <ccoutant at google dot com>, Sterling Augustine <saugustine at google dot com>
- Date: Wed, 2 Jan 2013 10:54:27 -0700
- Subject: Re: [RFA] Remove pre_expand_symtabs_matching quick_symbol_functions API
- References: <yjt2obhnfiwq.fsf@ruffy2.mtv.corp.google.com> <20130101192235.GA16192@host2.jankratochvil.net>
On Tue, Jan 1, 2013 at 12:22 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Fri, 21 Dec 2012 17:51:17 +0100, Doug Evans wrote:
>> Ok to check in?
>> [Or am I missing something ...]
>
> I do not see anything.
Thanks.
>>
>> static void
>> ! dw2_symtab_iter_init (struct dw2_symtab_iterator *iter,
>> ! struct mapped_index *index,
>> ! int want_specific_block,
>> ! int block_index,
>> ! domain_enum domain,
>> ! const char *name)
>> ! {
>
>
>
> [...]
>> ! while ((per_cu = dw2_symtab_iter_next (&iter)) != NULL)
>
> This is against the GNU Coding Standards as discussed now.
Yeah, except I think this case is a valid instance to violate them.
An equivalent is:
for (per_cu = dw2_symtab_iter_next (&iter);
per_cu != NULL;
per_cu = dw2_symtab_iter_next (&iter))
I could change foo_init/foo_next to foo_first/foo_next so that it
works better with for(), but blech.