contrib/gdb-7/gdb/linespec.c
static void
add_matching_symbols_to_info (const char *name,
			      struct collect_info *info,
			      struct program_space *pspace)
{
  int ix;
  struct symtab *elt;

  for (ix = 0; VEC_iterate (symtab_p, info->state->file_symtabs, ix, elt); ++ix)
    {
      struct symbol *sym;

      if (elt == NULL)
	{
	  iterate_over_all_matching_symtabs (name, VAR_DOMAIN,
					     collect_symbols, info,
					     pspace);
	  search_minsyms_for_name (info, name, pspace);
	}
      else if (pspace == NULL || pspace == SYMTAB_PSPACE (elt))
	{
	  /* Program spaces that are executing startup should have
	     been filtered out earlier.  */
	  gdb_assert (!SYMTAB_PSPACE (elt)->executing_startup);
	  set_current_program_space (SYMTAB_PSPACE (elt));
	  LA_ITERATE_OVER_SYMBOLS (get_search_block (elt), name,
				   VAR_DOMAIN, collect_symbols,
				   info);
	}
    }
}
/* A helper function to add all symbols matching NAME to INFO.  If
   PSPACE is not NULL, the search is restricted to just that program
   space.  */
A helper function to add all symbols matching NAME to INFO.  If
PSPACE is not NULL, the search is restricted to just that program
space.
A helper function to add all symbols matching NAME to INFO . If PSPACE is not NULL the search is restricted to just that program space .
static void
add_matching_symbols_to_info (const char *name,
			      struct collect_info *info,
			      struct program_space *pspace)
{
  int ix;
  struct symtab *elt;
  for (ix = 0; VEC_iterate (symtab_p, info->state->file_symtabs, ix, elt); ++ix)
    {
      struct symbol *sym;
      if (elt == NULL)
	{
	  iterate_over_all_matching_symtabs (name, VAR_DOMAIN,
					     collect_symbols, info,
					     pspace);
	  search_minsyms_for_name (info, name, pspace);
	}
      else if (pspace == NULL || pspace == SYMTAB_PSPACE (elt))
	{
	  gdb_assert (!SYMTAB_PSPACE (elt)->executing_startup);
	  set_current_program_space (SYMTAB_PSPACE (elt));
	  LA_ITERATE_OVER_SYMBOLS (get_search_block (elt), name,
				   VAR_DOMAIN, collect_symbols,
				   info);
	}
    }
}
static void add_matching_symbols_to_info ( const char * name , struct collect_info * info , struct program_space * pspace ) { int ix ; struct symtab * elt ; for ( ix = 0 ; VEC_iterate ( symtab_p , info -> state -> file_symtabs , ix , elt ) ; ++ ix ) { struct symbol * sym ; if ( elt == NULL ) { iterate_over_all_matching_symtabs ( name , VAR_DOMAIN , collect_symbols , info , pspace ) ; search_minsyms_for_name ( info , name , pspace ) ; } else if ( pspace == NULL || pspace == SYMTAB_PSPACE ( elt ) ) { gdb_assert ( ! SYMTAB_PSPACE ( elt ) -> executing_startup ) ; set_current_program_space ( SYMTAB_PSPACE ( elt ) ) ; LA_ITERATE_OVER_SYMBOLS ( get_search_block ( elt ) , name , VAR_DOMAIN , collect_symbols , info ) ; } } }
A helper function to add all symbols matching NAME to INFO.
A helper function to add all symbols matching NAME to INFO .
/* Program spaces that are executing startup should have
	     been filtered out earlier.  */