aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2001-09-06 20:50:48 +0000
committerKevin Buettner <kevinb@redhat.com>2001-09-06 20:50:48 +0000
commit9a058a09a9fadaf701938094ae83aa58f2207d58 (patch)
tree95b509579094bccd1bff95ff0e7518c5ba8de768 /gdb/dbxread.c
parent8050ee1adac4a14bbd958501e8ef4a29ef9707bc (diff)
downloadgdb-9a058a09a9fadaf701938094ae83aa58f2207d58.zip
gdb-9a058a09a9fadaf701938094ae83aa58f2207d58.tar.gz
gdb-9a058a09a9fadaf701938094ae83aa58f2207d58.tar.bz2
Don't use error result from find_stab_function_addr().
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index da55dde..04acd4e 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -2266,8 +2266,18 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
from N_FUN symbols. */
if (type == N_FUN
&& valu == ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile)))
- valu =
- find_stab_function_addr (name, last_source_file, objfile);
+ {
+ CORE_ADDR minsym_valu =
+ find_stab_function_addr (name, last_source_file, objfile);
+
+ /* find_stab_function_addr will return 0 if the minimal
+ symbol wasn't found. (Unfortunately, this might also
+ be a valid address.) Anyway, if it *does* return 0,
+ it is likely that the value was set correctly to begin
+ with... */
+ if (minsym_valu != 0)
+ valu = minsym_valu;
+ }
#endif
#ifdef SUN_FIXED_LBRAC_BUG