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.
This commit is contained in:
Ian Lance Taylor 1992-11-04 19:45:42 +00:00
parent 27ee87b307
commit a521e93a8e
2 changed files with 8 additions and 1 deletions

View File

@ -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) Tue Nov 3 11:29:17 1992 Ian Lance Taylor (ian@cygnus.com)
* dbxread.c (process_one_symbol): if not defined * dbxread.c (process_one_symbol): if not defined

View File

@ -176,7 +176,7 @@ lookup_minimal_symbol_by_pc (pc)
if ((msymbol = objfile -> msymbols) != NULL) if ((msymbol = objfile -> msymbols) != NULL)
{ {
lo = 0; lo = 0;
hi = objfile -> minimal_symbol_count - 2; hi = objfile -> minimal_symbol_count - 1;
/* This code assumes that the minimal symbols are sorted by /* This code assumes that the minimal symbols are sorted by
ascending address values. If the pc value is greater than or ascending address values. If the pc value is greater than or