* ia64-tdep.c (refine_prologue_limit): Make sure we don't scan

the linetable past the function end.
This commit is contained in:
Joel Brobecker
2007-09-18 23:53:07 +00:00
parent 89aaaff6d6
commit 2ad15e57ac
2 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2007-09-18 Joel Brobecker <brobecker@adacore.com>
* ia64-tdep.c (refine_prologue_limit): Make sure we don't scan
the linetable past the function end.
2007-09-11 Joel Brobecker <brobecker@adacore.com>
GDB 6.7 branch created (branch timestamp: 2007-09-07 14:00 UTC)

View File

@@ -967,6 +967,12 @@ refine_prologue_limit (CORE_ADDR pc, CORE_ADDR lim_pc, int *trust_limit)
{
struct symtab_and_line prologue_sal;
CORE_ADDR start_pc = pc;
CORE_ADDR end_pc;
/* The prologue can not possibly go past the function end itself,
so we can already adjust LIM_PC accordingly. */
if (find_pc_partial_function (pc, NULL, NULL, &end_pc) && end_pc < lim_pc)
lim_pc = end_pc;
/* Start off not trusting the limit. */
*trust_limit = 0;