aboutsummaryrefslogtreecommitdiff
path: root/gdb/partial-stab.h
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/partial-stab.h
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/partial-stab.h')
-rw-r--r--gdb/partial-stab.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h
index fe772ba..e18cabb 100644
--- a/gdb/partial-stab.h
+++ b/gdb/partial-stab.h
@@ -595,10 +595,22 @@ switch (CUR_SYMBOL_TYPE)
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
value for the bottom of the text seg in those cases. */
- if (pst && textlow_not_set)
+ if (CUR_SYMBOL_VALUE == ANOFFSET (objfile->section_offsets,
+ SECT_OFF_TEXT (objfile)))
{
- pst->textlow =
+ CORE_ADDR minsym_valu =
find_stab_function_addr (namestring, pst->filename, 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)
+ CUR_SYMBOL_VALUE = minsym_valu;
+ }
+ if (pst && textlow_not_set)
+ {
+ pst->textlow = CUR_SYMBOL_VALUE;
textlow_not_set = 0;
}
#endif
@@ -652,8 +664,17 @@ switch (CUR_SYMBOL_TYPE)
value for the bottom of the text seg in those cases. */
if (CUR_SYMBOL_VALUE == ANOFFSET (objfile->section_offsets,
SECT_OFF_TEXT (objfile)))
- CUR_SYMBOL_VALUE =
- find_stab_function_addr (namestring, pst->filename, objfile);
+ {
+ CORE_ADDR minsym_valu =
+ find_stab_function_addr (namestring, pst->filename, 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)
+ CUR_SYMBOL_VALUE = minsym_valu;
+ }
if (pst && textlow_not_set)
{
pst->textlow = CUR_SYMBOL_VALUE;