Wed Nov 4 11:13:25 1992 Ian Lance Taylor (ian@cygnus.com)
authorIan Lance Taylor <ian@airs.com>
Wed, 4 Nov 1992 19:45:42 +0000 (19:45 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 4 Nov 1992 19:45:42 +0000 (19:45 +0000)
* 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.

gdb/ChangeLog
gdb/minsyms.c

index 2963f811cd8a6d218e862091a0f45ac0edd24de1..44d68ce1590af18cc73b350b2f344855c1021b56 100644 (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)
 
        * dbxread.c (process_one_symbol): if not defined
index 164159241b46627a1cbffc8c3efd5fd2aba58428..b904f233805bcaeccde75c365d02ee8eecd2bc33 100644 (file)
@@ -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
This page took 0.028984 seconds and 4 git commands to generate.