contrib/gdb-7/gdb/linespec.c
static int
collect_symbols (struct symbol *sym, void *data)
{
  struct collect_info *info = data;
  struct symtab_and_line sal;

  if (symbol_to_sal (&sal, info->state->funfirstline, sym)
      && maybe_add_address (info->state->addr_set,
			    SYMTAB_PSPACE (SYMBOL_SYMTAB (sym)),
			    sal.pc))
    add_sal_to_sals (info->state, &info->result, &sal,
		     SYMBOL_NATURAL_NAME (sym));

  return 1;
}
/* A callback used to possibly add a symbol to the results.  */
A callback used to possibly add a symbol to the results.
A callback used to possibly add a symbol to the results .
static int
collect_symbols (struct symbol *sym, void *data)
{
  struct collect_info *info = data;
  struct symtab_and_line sal;
  if (symbol_to_sal (&sal, info->state->funfirstline, sym)
      && maybe_add_address (info->state->addr_set,
			    SYMTAB_PSPACE (SYMBOL_SYMTAB (sym)),
			    sal.pc))
    add_sal_to_sals (info->state, &info->result, &sal,
		     SYMBOL_NATURAL_NAME (sym));
  return 1;
}
static int collect_symbols ( struct symbol * sym , void * data ) { struct collect_info * info = data ; struct symtab_and_line sal ; if ( symbol_to_sal ( & sal , info -> state -> funfirstline , sym ) && maybe_add_address ( info -> state -> addr_set , SYMTAB_PSPACE ( SYMBOL_SYMTAB ( sym ) ) , sal . pc ) ) add_sal_to_sals ( info -> state , & info -> result , & sal , SYMBOL_NATURAL_NAME ( sym ) ) ; return 1 ; }
A callback used to possibly add a symbol to the results.
A callback used to possibly add a symbol to the results .