contrib/gdb-7/gdb/linespec.c
static int
collect_one_symbol (struct symbol *sym, void *d)
{
  struct decode_compound_collector *collector = d;
  void **slot;
  struct type *t;

  if (SYMBOL_CLASS (sym) != LOC_TYPEDEF)
    return 1;

  t = SYMBOL_TYPE (sym);
  CHECK_TYPEDEF (t);
  if (TYPE_CODE (t) != TYPE_CODE_STRUCT
      && TYPE_CODE (t) != TYPE_CODE_UNION
      && TYPE_CODE (t) != TYPE_CODE_NAMESPACE)
    return 1;

  slot = htab_find_slot (collector->unique_syms, sym, INSERT);
  if (!*slot)
    {
      *slot = sym;
      VEC_safe_push (symbolp, collector->symbols, sym);
    }

  return 1;
}
/* A callback for iterate_over_symbols that is used by
   lookup_prefix_sym to collect type symbols.  */
A callback for iterate_over_symbols that is used by
lookup_prefix_sym to collect type symbols.
A callback for iterate_over_symbols that is used by lookup_prefix_sym to collect type symbols .
static int
collect_one_symbol (struct symbol *sym, void *d)
{
  struct decode_compound_collector *collector = d;
  void **slot;
  struct type *t;
  if (SYMBOL_CLASS (sym) != LOC_TYPEDEF)
    return 1;
  t = SYMBOL_TYPE (sym);
  CHECK_TYPEDEF (t);
  if (TYPE_CODE (t) != TYPE_CODE_STRUCT
      && TYPE_CODE (t) != TYPE_CODE_UNION
      && TYPE_CODE (t) != TYPE_CODE_NAMESPACE)
    return 1;
  slot = htab_find_slot (collector->unique_syms, sym, INSERT);
  if (!*slot)
    {
      *slot = sym;
      VEC_safe_push (symbolp, collector->symbols, sym);
    }
  return 1;
}
static int collect_one_symbol ( struct symbol * sym , void * d ) { struct decode_compound_collector * collector = d ; void * * slot ; struct type * t ; if ( SYMBOL_CLASS ( sym ) != LOC_TYPEDEF ) return 1 ; t = SYMBOL_TYPE ( sym ) ; CHECK_TYPEDEF ( t ) ; if ( TYPE_CODE ( t ) != TYPE_CODE_STRUCT && TYPE_CODE ( t ) != TYPE_CODE_UNION && TYPE_CODE ( t ) != TYPE_CODE_NAMESPACE ) return 1 ; slot = htab_find_slot ( collector -> unique_syms , sym , INSERT ) ; if ( ! * slot ) { * slot = sym ; VEC_safe_push ( symbolp , collector -> symbols , sym ) ; } return 1 ; }
A callback for iterate_over_symbols that is used by
lookup_prefix_sym to collect type symbols.
A callback for iterate_over_symbols that is used by lookup_prefix_sym to collect type symbols .