contrib/gdb-7/gdb/linespec.c
static void
add_minsym (struct minimal_symbol *minsym, void *d)
{
  struct collect_minsyms *info = d;
  minsym_and_objfile_d mo;

  /* Exclude data symbols when looking for breakpoint locations.   */
  if (!info->list_mode)
    switch (minsym->type)
      {
	case mst_slot_got_plt:
	case mst_data:
	case mst_bss:
	case mst_abs:
	case mst_file_data:
	case mst_file_bss:
	  {
	    /* Make sure this minsym is not a function descriptor
	       before we decide to discard it.  */
	    struct gdbarch *gdbarch = info->objfile->gdbarch;
	    CORE_ADDR addr = gdbarch_convert_from_func_ptr_addr
			       (gdbarch, SYMBOL_VALUE_ADDRESS (minsym),
				&current_target);

	    if (addr == SYMBOL_VALUE_ADDRESS (minsym))
	      return;
	  }
      }

  mo.minsym = minsym;
  mo.objfile = info->objfile;
  VEC_safe_push (minsym_and_objfile_d, info->msyms, &mo);
}
/* Callback for iterate_over_minimal_symbols that adds the symbol to
   the result.  */
Callback for iterate_over_minimal_symbols that adds the symbol to
the result.
Callback for iterate_over_minimal_symbols that adds the symbol to the result .
static void
add_minsym (struct minimal_symbol *minsym, void *d)
{
  struct collect_minsyms *info = d;
  minsym_and_objfile_d mo;
  if (!info->list_mode)
    switch (minsym->type)
      {
	case mst_slot_got_plt:
	case mst_data:
	case mst_bss:
	case mst_abs:
	case mst_file_data:
	case mst_file_bss:
	  {
	    struct gdbarch *gdbarch = info->objfile->gdbarch;
	    CORE_ADDR addr = gdbarch_convert_from_func_ptr_addr
			       (gdbarch, SYMBOL_VALUE_ADDRESS (minsym),
				&current_target);
	    if (addr == SYMBOL_VALUE_ADDRESS (minsym))
	      return;
	  }
      }
  mo.minsym = minsym;
  mo.objfile = info->objfile;
  VEC_safe_push (minsym_and_objfile_d, info->msyms, &mo);
}
static void add_minsym ( struct minimal_symbol * minsym , void * d ) { struct collect_minsyms * info = d ; minsym_and_objfile_d mo ; if ( ! info -> list_mode ) switch ( minsym -> type ) { case mst_slot_got_plt : case mst_data : case mst_bss : case mst_abs : case mst_file_data : case mst_file_bss : { struct gdbarch * gdbarch = info -> objfile -> gdbarch ; CORE_ADDR addr = gdbarch_convert_from_func_ptr_addr ( gdbarch , SYMBOL_VALUE_ADDRESS ( minsym ) , & current_target ) ; if ( addr == SYMBOL_VALUE_ADDRESS ( minsym ) ) return ; } } mo . minsym = minsym ; mo . objfile = info -> objfile ; VEC_safe_push ( minsym_and_objfile_d , info -> msyms , & mo ) ; }
Callback for iterate_over_minimal_symbols that adds the symbol to
the result.
Callback for iterate_over_minimal_symbols that adds the symbol to the result .
/* Exclude data symbols when looking for breakpoint locations.   */ /* Make sure this minsym is not a function descriptor
	       before we decide to discard it.  */