summaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>1999-09-22 03:28:34 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>1999-09-22 03:28:34 +0000
commit3f58899ae80421eb6d2ed3d0d2329986f6e77c66 (patch)
treeef3cd06b12eee7b8d002704a5cf4fecea06a643d /gdb/minsyms.c
parentff49b98273f2bad8ff6ec338eee32c6d90113d05 (diff)
downloadgdb-3f58899ae80421eb6d2ed3d0d2329986f6e77c66.tar.gz
import gdb-1999-09-21
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r--gdb/minsyms.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index e878b916563..30e0e77185c 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -440,9 +440,9 @@ lookup_minimal_symbol_by_pc (pc)
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
CORE_ADDR
-find_stab_function_addr (namestring, pst, objfile)
+find_stab_function_addr (namestring, filename, objfile)
char *namestring;
- struct partial_symtab *pst;
+ char *filename;
struct objfile *objfile;
{
struct minimal_symbol *msym;
@@ -457,7 +457,7 @@ find_stab_function_addr (namestring, pst, objfile)
strncpy (p, namestring, n);
p[n] = 0;
- msym = lookup_minimal_symbol (p, pst->filename, objfile);
+ msym = lookup_minimal_symbol (p, filename, objfile);
if (msym == NULL)
{
/* Sun Fortran appends an underscore to the minimal symbol name,
@@ -465,8 +465,23 @@ find_stab_function_addr (namestring, pst, objfile)
was not found. */
p[n] = '_';
p[n + 1] = 0;
- msym = lookup_minimal_symbol (p, pst->filename, objfile);
+ 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);
}
#endif /* SOFUN_ADDRESS_MAYBE_MISSING */