Index: ia64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ia64-tdep.c,v retrieving revision 1.159 diff -u -p -r1.159 ia64-tdep.c --- ia64-tdep.c 23 Aug 2007 18:08:35 -0000 1.159 +++ ia64-tdep.c 17 Sep 2007 19:15:51 -0000 @@ -967,6 +967,12 @@ refine_prologue_limit (CORE_ADDR pc, COR { 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;