aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-10-04 22:01:38 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-10-04 22:01:38 +0000
commit291b84ff00e7a6ee7eba489ee34e5a972fbec95f (patch)
treef3bd3fdaa89ee0f4aab5039ac2a3edbbfdde5320
parent4f5666c520cc7abbf4edb0a74d0aca4bdc65ec8b (diff)
downloadgdb-291b84ff00e7a6ee7eba489ee34e5a972fbec95f.zip
gdb-291b84ff00e7a6ee7eba489ee34e5a972fbec95f.tar.gz
gdb-291b84ff00e7a6ee7eba489ee34e5a972fbec95f.tar.bz2
* minsyms.c (lookup_minimal_symbol_by_pc): Don't use mst_abs symbols.
-rw-r--r--gdb/ChangeLog2
-rw-r--r--gdb/minsyms.c20
2 files changed, 19 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b0299c8..8c8f91e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,7 @@
Mon Oct 4 11:02:11 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+ * minsyms.c (lookup_minimal_symbol_by_pc): Don't use mst_abs symbols.
+
* dbxread.c (process_one_symbol): Make n_opt_found static.
* Rename i386lynx-tdep.c to i386ly-tdep.c for 14 character file names.
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index b8d7372..dbb4e79 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -253,9 +253,23 @@ lookup_minimal_symbol_by_pc (pc)
objfile's minimal symbol table. See if it is the best one
overall. */
- if ((best_symbol == NULL) ||
- (SYMBOL_VALUE_ADDRESS (best_symbol) <
- SYMBOL_VALUE_ADDRESS (&msymbol[hi])))
+ /* Skip any absolute symbols. This is apparently what adb
+ and dbx do, and is needed for the CM-5. There are two
+ known possible problems: (1) on ELF, apparently end, edata,
+ etc. are absolute. Not sure ignoring them here is a big
+ deal, but if we want to use them, the fix would go in
+ elfread.c. (2) I think shared library entry points on the
+ NeXT are absolute. If we want special handling for this
+ it probably should be triggered by a special
+ mst_abs_or_lib or some such. */
+ while (hi >= 0
+ && msymbol[hi].type == mst_abs)
+ --hi;
+
+ if (hi >= 0
+ && ((best_symbol == NULL) ||
+ (SYMBOL_VALUE_ADDRESS (best_symbol) <
+ SYMBOL_VALUE_ADDRESS (&msymbol[hi]))))
{
best_symbol = &msymbol[hi];
}