aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-09-22 03:28:34 +0000
committerJason Molenda <jmolenda@apple.com>1999-09-22 03:28:34 +0000
commitc2c6d25f0d5eea4f834420870021a8c52db24018 (patch)
treef4b3d5e9e3207fa8118db4085f9c6a0cbc2bdaf6 /gdb/minsyms.c
parent54af6ff67571ba569b94e26d558d02f9955e6844 (diff)
downloadgdb-c2c6d25f0d5eea4f834420870021a8c52db24018.zip
gdb-c2c6d25f0d5eea4f834420870021a8c52db24018.tar.gz
gdb-c2c6d25f0d5eea4f834420870021a8c52db24018.tar.bz2
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 e878b91..30e0e77 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 */