[RFA] Remove pre_expand_symtabs_matching quick_symbol_functions API

Jan Kratochvil jan.kratochvil@redhat.com
Wed Jan 2 22:56:00 GMT 2013


On Wed, 02 Jan 2013 18:54:27 +0100, Doug Evans wrote:
> 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.

I find the following code appropriate in such cases:

while ((per_cu = dw2_symtab_iter_next (&iter)) != NULL)
  {
  }
->
for (;;)
  {
    per_cu = dw2_symtab_iter_next (&iter);
    if (per_cu == NULL)
      break;
  }

Sorry for this nitpick.


Jan



More information about the Gdb-patches mailing list