Patch from Peter Schauer:

* symtab.c (find_pc_sect_line): If we can't find the function
containing PC, we certainly won't have line number information for
that location, so return zero immediately.
This commit is contained in:
Jim Blandy 2001-11-13 16:42:50 +00:00
parent 0dfe746f74
commit 648f4f7985
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2001-11-13 Jim Blandy <jimb@redhat.com>
Patch from Peter Schauer:
* symtab.c (find_pc_sect_line): If we can't find the function
containing PC, we certainly won't have line number information for
that location, so return zero immediately.
2001-11-10 Andrew Cagney <ac131313@redhat.com>
* config/i960/tm-nindy960.h (REGISTER_CONVERTIBLE)

View File

@ -1570,6 +1570,14 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
INIT_SAL (&val); /* initialize to zeroes */
/* Don't even think about line numbers if we can't find a function
symbol for PC. */
if (find_pc_function (pc) == NULL)
{
val.pc = pc;
return val;
}
if (notcurrent)
pc -= 1;