* spu-tdep.c (spu_frame_unwind_cache): Do not attempt to unwind
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 3 Sep 2008 19:19:42 +0000 (19:19 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Wed, 3 Sep 2008 19:19:42 +0000 (19:19 +0000)
SP or return address if we failed to find a valid frame.

gdb/ChangeLog
gdb/spu-tdep.c

index 0aa10518327a51409d6a4b00b6eebd28f926fa65..a52ce2ec2ac11eb19deaf8f1f571fa86be651e4a 100644 (file)
@@ -1,3 +1,8 @@
+2008-09-03  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * spu-tdep.c (spu_frame_unwind_cache): Do not attempt to unwind
+       SP or return address if we failed to find a valid frame.
+
 2008-09-03  Aleksandar Ristovski  <aristovski@qnx.com>
 
        * breakpoint.c (breakpoint_init_inferior): Mark as not inserted only
index 6e2fdb7212e0fc29dbfa2207803ea1c62a39babe..b016d4ba79e65493e91fbfda6378616ffbdbabfe 100644 (file)
@@ -910,6 +910,10 @@ spu_frame_unwind_cache (struct frame_info *this_frame,
        }
     }
 
+  /* If we didn't find a frame, we cannot determine SP / return address.  */
+  if (info->frame_base == 0)
+    return info;
+
   /* The previous SP is equal to the CFA.  */
   trad_frame_set_value (info->saved_regs, SPU_SP_REGNUM, info->frame_base);