From: Joel Brobecker Date: Tue, 18 Sep 2007 23:53:07 +0000 (+0000) Subject: * ia64-tdep.c (refine_prologue_limit): Make sure we don't scan X-Git-Tag: gdb_6_7-2007-10-10-release~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ad15e57ac82271fe7eafd23de783f0ae951f215;p=thirdparty%2Fbinutils-gdb.git * ia64-tdep.c (refine_prologue_limit): Make sure we don't scan the linetable past the function end. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5f14e8f15ce..293998b0fc5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2007-09-18 Joel Brobecker + + * ia64-tdep.c (refine_prologue_limit): Make sure we don't scan + the linetable past the function end. + 2007-09-11 Joel Brobecker GDB 6.7 branch created (branch timestamp: 2007-09-07 14:00 UTC) diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 14e56032142..8245798d288 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -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;