Re: Index files are not used in the session where they were created
Dmitry Neverov via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CAEY59_LRnM6+k3P1Niy+KxuEMxYDEhxYstXuDAVmieTVbAuv=g@mail.gmail.com> |
Please ignore my previous message regarding an empty qf_require_partial_symbols(). I think I was wrong and now understand a bit better where the difference in time comes from. In my case lookup is slow for a symbol with name wxObjectDataPtr. When index is not used, the cooked_index_functions::expand_symtabs_matching() finds many entries of the form 'wxObjectDataPtr<wxBitmapBundleImpl>'. Such entries don't have a parent entry, and so they cannot be filtered out, and the dw2_expand_symtabs_matching_one() is called. Inside the expansion callback (lambda in objfile::lookup_symbol) the block_find_symbol() is called which eventually calls cp_fq_symbol_name_matches(). cp_fq_symbol_name_matches() takes templates into account and decides that wxObjectDataPtr<wxBitmapBundleImpl> doesn't actually match the wxObjectDataPtr, and so no symbols from symtab match. When index is used, the check for templates happens in dw2_expand_symtabs_matching_symbol(). The name_matcher (default_symbol_name_matcher) is called before deciding to expand the symtab. So entries like 'wxObjectDataPtr<wxBitmapBundleImpl>' don't cause expansion for lookup name wxObjectDataPtr. I wonder if it is possible to check templates before symtab expansion in the no-index case as well?