From: Ian Lance Taylor Date: Wed, 4 Nov 1992 19:45:42 +0000 (+0000) Subject: Wed Nov 4 11:13:25 1992 Ian Lance Taylor (ian@cygnus.com) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a521e93a8e61ace6e58e063719c385c2d1217159;p=binutils-gdb.git 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2963f811cd8..44d68ce1590 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 164159241b4..b904f233805 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