From: Daniel Jacobowitz Date: Tue, 28 Nov 2006 16:23:32 +0000 (+0000) Subject: * symtab.c (find_pc_sect_line): Do not return a line before X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e86e87f77fd5d8afb3e714f1d9e09e0ff5b4e6ff;p=binutils-gdb.git * symtab.c (find_pc_sect_line): Do not return a line before the start of a symtab. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 72cf3c61e6a..5497f17811c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-11-28 Daniel Jacobowitz + + * symtab.c (find_pc_sect_line): Do not return a line before + the start of a symtab. + 2006-11-24 Ulrich Weigand * NEWS: SPU target is already supported in GDB 6.6. diff --git a/gdb/symtab.c b/gdb/symtab.c index 10c723a141c..62109358ffa 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -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) {