diff options
author | Daniel Jacobowitz <dan@debian.org> | 2006-11-28 16:23:32 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2006-11-28 16:23:32 +0000 |
commit | b343201bc54746084b9befcdb7deab9be7943672 (patch) | |
tree | f1e47eb8f1d249bf513b57b51bf4dc1f5bc22e44 /gdb/symtab.c | |
parent | b134c8015144d740b52c84c4029a9da4f0a7ffcb (diff) | |
download | gdb-b343201bc54746084b9befcdb7deab9be7943672.tar.gz |
* symtab.c (find_pc_sect_line): Do not return a line before
the start of a symtab.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 22 |
1 files changed, 5 insertions, 17 deletions
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) { |