+ psym++;
+ }
+
+ ps->searched_flag = result;
+ return result == PST_SEARCHED_AND_FOUND;
+}
+
+static void
+expand_symtabs_matching_via_partial
+ (struct objfile *objfile,
+ int (*file_matcher) (const char *, void *),
+ int (*name_matcher) (const char *, void *),
+ enum search_domain kind,
+ void *data)
+{
+ struct partial_symtab *ps;
+
+ /* Clear the search flags. */
+ ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, ps)
+ {
+ ps->searched_flag = PST_NOT_SEARCHED;
+ }
+
+ ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, ps)
+ {
+ if (ps->readin)
+ continue;
+
+ /* We skip shared psymtabs because file-matching doesn't apply
+ to them; but we search them later in the loop. */
+ if (ps->user != NULL)
+ continue;
+
+ if (file_matcher)
+ {
+ if (ps->anonymous)
+ continue;
+ if (! (*file_matcher) (ps->filename, data))
+ continue;
+ }
+
+ if (recursively_search_psymtabs (ps, objfile, kind, name_matcher, data))
+ psymtab_to_symtab (objfile, ps);