contrib/gdb-7/gdb/linespec.c
static void
decode_digits_ordinary (struct linespec_state *self,
			int line,
			struct symtabs_and_lines *sals,
			struct linetable_entry **best_entry)
{
  int ix;
  struct symtab *elt;

  for (ix = 0; VEC_iterate (symtab_p, self->file_symtabs, ix, elt); ++ix)
    {
      int i;
      VEC (CORE_ADDR) *pcs;
      CORE_ADDR pc;

      /* The logic above should ensure this.  */
      gdb_assert (elt != NULL);

      set_current_program_space (SYMTAB_PSPACE (elt));

      pcs = find_pcs_for_symtab_line (elt, line, best_entry);
      for (i = 0; VEC_iterate (CORE_ADDR, pcs, i, pc); ++i)
	{
	  struct symtab_and_line sal;

	  init_sal (&sal);
	  sal.pspace = SYMTAB_PSPACE (elt);
	  sal.symtab = elt;
	  sal.line = line;
	  sal.pc = pc;
	  add_sal_to_sals_basic (sals, &sal);
	}

      VEC_free (CORE_ADDR, pcs);
    }
}
/* A helper for decode_all_digits that iterates over the symtabs,
   adding lines to the VEC.  */
A helper for decode_all_digits that iterates over the symtabs,
adding lines to the VEC.
A helper for decode_all_digits that iterates over the symtabs adding lines to the VEC .
static void
decode_digits_ordinary (struct linespec_state *self,
			int line,
			struct symtabs_and_lines *sals,
			struct linetable_entry **best_entry)
{
  int ix;
  struct symtab *elt;
  for (ix = 0; VEC_iterate (symtab_p, self->file_symtabs, ix, elt); ++ix)
    {
      int i;
      VEC (CORE_ADDR) *pcs;
      CORE_ADDR pc;
      gdb_assert (elt != NULL);
      set_current_program_space (SYMTAB_PSPACE (elt));
      pcs = find_pcs_for_symtab_line (elt, line, best_entry);
      for (i = 0; VEC_iterate (CORE_ADDR, pcs, i, pc); ++i)
	{
	  struct symtab_and_line sal;
	  init_sal (&sal);
	  sal.pspace = SYMTAB_PSPACE (elt);
	  sal.symtab = elt;
	  sal.line = line;
	  sal.pc = pc;
	  add_sal_to_sals_basic (sals, &sal);
	}
      VEC_free (CORE_ADDR, pcs);
    }
}
static void decode_digits_ordinary ( struct linespec_state * self , int line , struct symtabs_and_lines * sals , struct linetable_entry * * best_entry ) { int ix ; struct symtab * elt ; for ( ix = 0 ; VEC_iterate ( symtab_p , self -> file_symtabs , ix , elt ) ; ++ ix ) { int i ; VEC ( CORE_ADDR ) * pcs ; CORE_ADDR pc ; gdb_assert ( elt != NULL ) ; set_current_program_space ( SYMTAB_PSPACE ( elt ) ) ; pcs = find_pcs_for_symtab_line ( elt , line , best_entry ) ; for ( i = 0 ; VEC_iterate ( CORE_ADDR , pcs , i , pc ) ; ++ i ) { struct symtab_and_line sal ; init_sal ( & sal ) ; sal . pspace = SYMTAB_PSPACE ( elt ) ; sal . symtab = elt ; sal . line = line ; sal . pc = pc ; add_sal_to_sals_basic ( sals , & sal ) ; } VEC_free ( CORE_ADDR , pcs ) ; } }
A helper for decode_all_digits that iterates over the symtabs,
adding lines to the VEC.
A helper for decode_all_digits that iterates over the symtabs adding lines to the VEC .
/* The logic above should ensure this.  */