diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2963f811cd..44d68ce159 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 164159241b..b904f23380 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