aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1992-11-04 19:45:42 +0000
committerIan Lance Taylor <ian@airs.com>1992-11-04 19:45:42 +0000
commita521e93a8e61ace6e58e063719c385c2d1217159 (patch)
tree6f2b6e0b14c92288db76ee353bedd0ff0e4b4fdf
parent27ee87b307f4a162f0865c79756dfce7cca0f46f (diff)
downloadgdb-a521e93a8e61ace6e58e063719c385c2d1217159.zip
gdb-a521e93a8e61ace6e58e063719c385c2d1217159.tar.gz
gdb-a521e93a8e61ace6e58e063719c385c2d1217159.tar.bz2
Wed Nov 4 11:13:25 1992 Ian Lance Taylor (ian@cygnus.com)
* minsyms.c (lookup_minimal_symbol_by_pc): subtract 1, not 2, from minimal_symbol_count, because the NULL symbol is not included in the count. This prevented this function from finding the last symbol in the table.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/minsyms.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2963f81..44d68ce 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+Wed Nov 4 11:13:25 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * minsyms.c (lookup_minimal_symbol_by_pc): subtract 1, not 2, from
+ minimal_symbol_count, because the NULL symbol is not included in
+ the count. This prevented this function from finding the last
+ symbol in the table.
+
Tue Nov 3 11:29:17 1992 Ian Lance Taylor (ian@cygnus.com)
* dbxread.c (process_one_symbol): if not defined
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 1641592..b904f23 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -176,7 +176,7 @@ lookup_minimal_symbol_by_pc (pc)
if ((msymbol = objfile -> msymbols) != NULL)
{
lo = 0;
- hi = objfile -> minimal_symbol_count - 2;
+ hi = objfile -> minimal_symbol_count - 1;
/* This code assumes that the minimal symbols are sorted by
ascending address values. If the pc value is greater than or