aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
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 /gdb/minsyms.c
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.
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r--gdb/minsyms.c2
1 files changed, 1 insertions, 1 deletions
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