Re: [PATCH 2/3 v2] Interleave completion list building with symbol table expansion

Doug Evans
2014-12-05T22:58:58Z

Gary Benson <gbenson@redhat.com> writes:
> This commit makes default_make_symbol_completion_list_break_on build
> the list of completions as it expands the necessary symbol tables,
> rather than expanding all necessary symbol tables first and then
> building the completion lists second. This allows for the early
> termination of symbol table expansion if required.
>
> gdb/ChangeLog:
>
> * symtab.c (struct add_name_data) : New field.
> Updated comments.
> (add_symtab_completions): New function.
> (symtab_expansion_callback): Likewise.
> (default_make_symbol_completion_list_break_on): Set datum.code.
> Move minimal symbol scan before calling expand_symtabs_matching.
> Scan known primary symtabs for externs and statics before calling
> expand_symtabs_matching. Pass symtab_expansion_callback as
> expansion_notify argument to expand_symtabs_matching. Do not scan
> primary symtabs for externs and statics after calling
> expand_symtabs_matching.

LGTM