diff options
author | Daniel Jacobowitz <drow@false.org> | 2003-01-13 21:59:53 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2003-01-13 21:59:53 +0000 |
commit | 083ae9356e21082ea18fc21d91a84bbaa7a76fc7 (patch) | |
tree | 3ee50c5669d1c1df11db6c880e9d1492581cf500 /gdb/symtab.c | |
parent | 5365276c132540cae62e96669d418a90b4077ca3 (diff) | |
download | gdb-083ae9356e21082ea18fc21d91a84bbaa7a76fc7.zip gdb-083ae9356e21082ea18fc21d91a84bbaa7a76fc7.tar.gz gdb-083ae9356e21082ea18fc21d91a84bbaa7a76fc7.tar.bz2 |
* symtab.c (find_pc_sect_line): Don't consider end-of-function
lines.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 7eab19f..15f4c3f 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1,8 +1,8 @@ /* Symbol table lookup for the GNU debugger, GDB. Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, - 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software - Foundation, Inc. + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Free Software Foundation, Inc. This file is part of GDB. @@ -2012,9 +2012,11 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent) the first line, prev will not be set. */ /* Is this file's best line closer than the best in the other files? - If so, record this file, and its best line, as best so far. */ + If so, record this file, and its best line, as best so far. Don't + save prev if it represents the end of a function (i.e. line number + 0) instead of a real line. */ - if (prev && (!best || prev->pc > best->pc)) + if (prev && prev->line && (!best || prev->pc > best->pc)) { best = prev; best_symtab = s; |