aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1998-06-28 18:36:50 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1998-06-28 18:36:50 +0000
commit655a27b0993a240c5ebcefee95b4be1f95b77f28 (patch)
tree4059b451785c8490290f199161858dc1f65ca1f8 /gdb/minsyms.c
parentf35ea21826aadb993ad6deb44f781cfbf5f90bff (diff)
downloadfsf-binutils-gdb-655a27b0993a240c5ebcefee95b4be1f95b77f28.zip
fsf-binutils-gdb-655a27b0993a240c5ebcefee95b4be1f95b77f28.tar.gz
fsf-binutils-gdb-655a27b0993a240c5ebcefee95b4be1f95b77f28.tar.bz2
Improve support for SunPro F77.
* dbxread.c (end_psymtab, process_one_symbol): Handle minimal symbols with trailing underscore names. * minsyms.c (find_stab_function_addr): Ditto. * dbxread.c (process_one_symbol): Ignore N_ALIAS for now. * partial-stab.h (case N_ALIAS): Ditto. * stabsread.c (read_sun_builtin_type): Handle boolean types.
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r--gdb/minsyms.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 04257c6..30ecc90 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -1,5 +1,5 @@
/* GDB routines for manipulating the minimal symbol tables.
- Copyright 1992, 1993, 1994, 1996, 1996 Free Software Foundation, Inc.
+ Copyright 1992, 93, 94, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
This file is part of GDB.
@@ -452,11 +452,20 @@ find_stab_function_addr (namestring, pst, objfile)
if (p == NULL)
p = namestring;
n = p - namestring;
- p = alloca (n + 1);
+ p = alloca (n + 2);
strncpy (p, namestring, n);
p[n] = 0;
msym = lookup_minimal_symbol (p, pst->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, pst->filename, objfile);
+ }
return msym == NULL ? 0 : SYMBOL_VALUE_ADDRESS (msym);
}
#endif /* SOFUN_ADDRESS_MAYBE_MISSING */