contrib/gdb-7/gdb/linespec.c
static VEC (symtab_p) *
collect_symtabs_from_filename (const char *file)
{
  struct symtab_collector collector;
  struct cleanup *cleanups;
  struct program_space *pspace;

  collector.symtabs = NULL;
  collector.symtab_table = htab_create (1, htab_hash_pointer, htab_eq_pointer,
					NULL);
  cleanups = make_cleanup_htab_delete (collector.symtab_table);

  /* Find that file's data.  */
  ALL_PSPACES (pspace)
  {
    if (pspace->executing_startup)
      continue;

    set_current_program_space (pspace);
    iterate_over_symtabs (file, add_symtabs_to_list, &collector);
  }

  do_cleanups (cleanups);
  return collector.symtabs;
}
/* Given a file name, return a VEC of all matching symtabs.  */
Given a file name, return a VEC of all matching symtabs.
Given a file name return a VEC of all matching symtabs .
static VEC (symtab_p) *
collect_symtabs_from_filename (const char *file)
{
  struct symtab_collector collector;
  struct cleanup *cleanups;
  struct program_space *pspace;
  collector.symtabs = NULL;
  collector.symtab_table = htab_create (1, htab_hash_pointer, htab_eq_pointer,
					NULL);
  cleanups = make_cleanup_htab_delete (collector.symtab_table);
  ALL_PSPACES (pspace)
  {
    if (pspace->executing_startup)
      continue;
    set_current_program_space (pspace);
    iterate_over_symtabs (file, add_symtabs_to_list, &collector);
  }
  do_cleanups (cleanups);
  return collector.symtabs;
}
static VEC ( symtab_p ) * collect_symtabs_from_filename ( const char * file ) { struct symtab_collector collector ; struct cleanup * cleanups ; struct program_space * pspace ; collector . symtabs = NULL ; collector . symtab_table = htab_create ( 1 , htab_hash_pointer , htab_eq_pointer , NULL ) ; cleanups = make_cleanup_htab_delete ( collector . symtab_table ) ; ALL_PSPACES ( pspace ) { if ( pspace -> executing_startup ) continue ; set_current_program_space ( pspace ) ; iterate_over_symtabs ( file , add_symtabs_to_list , & collector ) ; } do_cleanups ( cleanups ) ; return collector . symtabs ; }
Given a file name, return a VEC of all matching symtabs.
Given a file name return a VEC of all matching symtabs .
/* Find that file's data.  */