contrib/gdb-7/gdb/linespec.c
static void
minsym_found (struct linespec_state *self, struct objfile *objfile,
	      struct minimal_symbol *msymbol,
	      struct symtabs_and_lines *result)
{
  struct gdbarch *gdbarch = get_objfile_arch (objfile);
  CORE_ADDR pc;
  struct symtab_and_line sal;

  sal = find_pc_sect_line (SYMBOL_VALUE_ADDRESS (msymbol),
			   (struct obj_section *) 0, 0);
  sal.section = SYMBOL_OBJ_SECTION (msymbol);

  /* The minimal symbol might point to a function descriptor;
     resolve it to the actual code address instead.  */
  pc = gdbarch_convert_from_func_ptr_addr (gdbarch, sal.pc, &current_target);
  if (pc != sal.pc)
    sal = find_pc_sect_line (pc, NULL, 0);

  if (self->funfirstline)
    skip_prologue_sal (&sal);

  if (maybe_add_address (self->addr_set, objfile->pspace, sal.pc))
    add_sal_to_sals (self, result, &sal, SYMBOL_NATURAL_NAME (msymbol));
}
/* We've found a minimal symbol MSYMBOL to associate with our
   linespec; add it to the result symtabs_and_lines.  */
We've found a minimal symbol MSYMBOL to associate with our
linespec; add it to the result symtabs_and_lines.
We ' ve found a minimal symbol MSYMBOL to associate with our linespec ; add it to the result symtabs_and_lines .
static void
minsym_found (struct linespec_state *self, struct objfile *objfile,
	      struct minimal_symbol *msymbol,
	      struct symtabs_and_lines *result)
{
  struct gdbarch *gdbarch = get_objfile_arch (objfile);
  CORE_ADDR pc;
  struct symtab_and_line sal;
  sal = find_pc_sect_line (SYMBOL_VALUE_ADDRESS (msymbol),
			   (struct obj_section *) 0, 0);
  sal.section = SYMBOL_OBJ_SECTION (msymbol);
  pc = gdbarch_convert_from_func_ptr_addr (gdbarch, sal.pc, &current_target);
  if (pc != sal.pc)
    sal = find_pc_sect_line (pc, NULL, 0);
  if (self->funfirstline)
    skip_prologue_sal (&sal);
  if (maybe_add_address (self->addr_set, objfile->pspace, sal.pc))
    add_sal_to_sals (self, result, &sal, SYMBOL_NATURAL_NAME (msymbol));
}
static void minsym_found ( struct linespec_state * self , struct objfile * objfile , struct minimal_symbol * msymbol , struct symtabs_and_lines * result ) { struct gdbarch * gdbarch = get_objfile_arch ( objfile ) ; CORE_ADDR pc ; struct symtab_and_line sal ; sal = find_pc_sect_line ( SYMBOL_VALUE_ADDRESS ( msymbol ) , ( struct obj_section * ) 0 , 0 ) ; sal . section = SYMBOL_OBJ_SECTION ( msymbol ) ; pc = gdbarch_convert_from_func_ptr_addr ( gdbarch , sal . pc , & current_target ) ; if ( pc != sal . pc ) sal = find_pc_sect_line ( pc , NULL , 0 ) ; if ( self -> funfirstline ) skip_prologue_sal ( & sal ) ; if ( maybe_add_address ( self -> addr_set , objfile -> pspace , sal . pc ) ) add_sal_to_sals ( self , result , & sal , SYMBOL_NATURAL_NAME ( msymbol ) ) ; }
We've found a minimal symbol MSYMBOL to associate with our
linespec; add it to the result symtabs_and_lines.
We ' ve found a minimal symbol MSYMBOL to associate with our linespec ; add it to the result symtabs_and_lines .
/* The minimal symbol might point to a function descriptor;
     resolve it to the actual code address instead.  */