- return lookup_minimal_symbol_by_pc_section (pc, find_pc_mapped_section (pc));
-}
-
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
-CORE_ADDR
-find_stab_function_addr (namestring, filename, objfile)
- char *namestring;
- char *filename;
- struct objfile *objfile;
-{
- struct minimal_symbol *msym;
- char *p;
- int n;
-
- p = strchr (namestring, ':');
- if (p == NULL)
- p = namestring;
- n = p - namestring;
- p = alloca (n + 2);
- strncpy (p, namestring, n);
- p[n] = 0;
-
- msym = lookup_minimal_symbol (p, filename, objfile);
- if (msym == NULL)
- {
- /* Sun Fortran appends an underscore to the minimal symbol name,
- try again with an appended underscore if the minimal symbol
- was not found. */
- p[n] = '_';
- p[n + 1] = 0;
- msym = lookup_minimal_symbol (p, filename, objfile);
- }
-
- if (msym == NULL && filename != NULL)
- {
- /* Try again without the filename. */
- p[n] = 0;
- msym = lookup_minimal_symbol (p, 0, objfile);
- }
- if (msym == NULL && filename != NULL)
- {
- /* And try again for Sun Fortran, but without the filename. */
- p[n] = '_';
- p[n + 1] = 0;
- msym = lookup_minimal_symbol (p, 0, objfile);
- }
-
- return msym == NULL ? 0 : SYMBOL_VALUE_ADDRESS (msym);
+ /* NOTE: cagney/2004-01-27: This was using find_pc_mapped_section to
+ force the section but that (well unless you're doing overlay
+ debugging) always returns NULL making the call somewhat useless. */
+ struct obj_section *section = find_pc_section (pc);
+ if (section == NULL)
+ return NULL;
+ return lookup_minimal_symbol_by_pc_section (pc, section->the_bfd_section);