]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* ia64-tdep.c (refine_prologue_limit): Make sure we don't scan
authorJoel Brobecker <brobecker@gnat.com>
Tue, 18 Sep 2007 23:53:07 +0000 (23:53 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 18 Sep 2007 23:53:07 +0000 (23:53 +0000)
        the linetable past the function end.

gdb/ChangeLog
gdb/ia64-tdep.c

index 5f14e8f15ce041006df53c7d43540d2d0ee1ac0e..293998b0fc5dc60d780bf8ba7657d6bc0ff6c70d 100644 (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)
index 14e56032142f41e2f72623c9656fece51e154159..8245798d28880b1daf882f77086d5b6423a52fe0 100644 (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;