* emultempl/mmixelf.em: Remove incorrect '#line' directive.
[deliverable/binutils-gdb.git] / gdb / minsyms.c
index 55f2d4a569542cba714adc759f68b67effc716dc..e4b0356b868f1addd18350369eb2dab420f08e91 100644 (file)
@@ -510,6 +510,22 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc, asection *section)
                      continue;
                    }
 
+                 /* If we are past the end of the current symbol, try
+                    the previous symbol if it has a larger overlapping
+                    size.  This happens on i686-pc-linux-gnu with glibc;
+                    the nocancel variants of system calls are inside
+                    the cancellable variants, but both have sizes.  */
+                 if (hi > 0
+                     && MSYMBOL_SIZE (&msymbol[hi]) != 0
+                     && pc >= (SYMBOL_VALUE_ADDRESS (&msymbol[hi])
+                               + MSYMBOL_SIZE (&msymbol[hi]))
+                     && pc < (SYMBOL_VALUE_ADDRESS (&msymbol[hi - 1])
+                              + MSYMBOL_SIZE (&msymbol[hi - 1])))
+                   {
+                     hi--;
+                     continue;
+                   }
+
                  /* Otherwise, this symbol must be as good as we're going
                     to get.  */
                  break;
This page took 0.024015 seconds and 4 git commands to generate.