This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit, spu] Do not error out if backchain is unreadable


Hello,

following up on:
http://sourceware.org/ml/gdb-patches/2008-07/msg00242.html

there were still cases where we'd get an error during unwinding.
This time these were caused by spu_frame_unwind_cache still attempting
to unwind some values even though we already failed to find any valid
frame ...

Fixed by the patch below; tested on spu-elf; committed to mainline.

Bye,
Ulrich


ChangeLog:

	* spu-tdep.c (spu_frame_unwind_cache): Do not attempt to unwind
	SP or return address if we failed to find a valid frame.

Index: gdb/spu-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/spu-tdep.c,v
retrieving revision 1.36
diff -c -p -r1.36 spu-tdep.c
*** gdb/spu-tdep.c	24 Aug 2008 16:39:57 -0000	1.36
--- gdb/spu-tdep.c	3 Sep 2008 17:21:38 -0000
*************** spu_frame_unwind_cache (struct frame_inf
*** 910,915 ****
--- 910,919 ----
  	}
      }
  
+   /* 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);
  
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]