aboutsummaryrefslogtreecommitdiff
path: root/gdb/ia64-tdep.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2007-09-18 23:46:04 +0000
committerJoel Brobecker <brobecker@gnat.com>2007-09-18 23:46:04 +0000
commit393129712fd746e2ddac318e085fe468b0f78f1c (patch)
treee9c9506ede6b5419b798b1fc5c379e7b8ebc15a9 /gdb/ia64-tdep.c
parent558dc30aec279de423252b8d38698db14125a436 (diff)
downloadgdb-393129712fd746e2ddac318e085fe468b0f78f1c.zip
gdb-393129712fd746e2ddac318e085fe468b0f78f1c.tar.gz
gdb-393129712fd746e2ddac318e085fe468b0f78f1c.tar.bz2
* ia64-tdep.c (refine_prologue_limit): Make sure we don't scan
the linetable past the function end.
Diffstat (limited to 'gdb/ia64-tdep.c')
-rw-r--r--gdb/ia64-tdep.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 14e5603..8245798 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;