* symtab.c (find_pc_sect_line): Do not return a line before
authorDaniel Jacobowitz <drow@false.org>
Tue, 28 Nov 2006 16:23:32 +0000 (16:23 +0000)
committerDaniel Jacobowitz <drow@false.org>
Tue, 28 Nov 2006 16:23:32 +0000 (16:23 +0000)
the start of a symtab.

gdb/ChangeLog
gdb/symtab.c

index 72cf3c61e6ae4763f9085b97f20085a33149f3c0..5497f17811c24146fcc6a11f111e1b2c509b54f3 100644 (file)
@@ -1,3 +1,8 @@
+2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * symtab.c (find_pc_sect_line): Do not return a line before
+       the start of a symtab.
+
 2006-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * NEWS: SPU target is already supported in GDB 6.6.
index 10c723a141cba464bc6758c0dc6199e1e0bcd85d..62109358ffa376ee7b3824d7738a3d991a3355b4 100644 (file)
@@ -2222,23 +2222,11 @@ find_pc_sect_line (CORE_ADDR pc, struct bfd_section *section, int notcurrent)
 
   if (!best_symtab)
     {
-      if (!alt_symtab)
-       {                       /* If we didn't find any line # info, just
-                                  return zeros.  */
-         val.pc = pc;
-       }
-      else
-       {
-         val.symtab = alt_symtab;
-         val.line = alt->line - 1;
-
-         /* Don't return line 0, that means that we didn't find the line.  */
-         if (val.line == 0)
-           ++val.line;
-
-         val.pc = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK));
-         val.end = alt->pc;
-       }
+      /* If we didn't find any line number info, just return zeros.
+        We used to return alt->line - 1 here, but that could be
+        anywhere; if we don't have line number info for this PC,
+        don't make some up.  */
+      val.pc = pc;
     }
   else if (best->line == 0)
     {
This page took 0.029779 seconds and 4 git commands to generate.