* spu-tdep.c (spu_frame_unwind_cache): Do not error if

backchain is unreadable.
This commit is contained in:
Ulrich Weigand 2008-07-12 22:42:52 +00:00
parent 836acd6d9a
commit cdc9523a4d
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
* spu-tdep.c (spu_frame_unwind_cache): Do not error if
backchain is unreadable.
2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
* spu-linux-nat.c: Include "gdbthread.h".

View file

@ -888,15 +888,17 @@ spu_frame_unwind_cache (struct frame_info *this_frame,
/* Otherwise, fall back to reading the backchain link. */
else
{
CORE_ADDR reg, backchain;
CORE_ADDR reg;
LONGEST backchain;
int status;
/* Get the backchain. */
reg = get_frame_register_unsigned (this_frame, SPU_SP_REGNUM);
backchain = read_memory_unsigned_integer (reg, 4);
status = safe_read_memory_integer (reg, 4, &backchain);
/* A zero backchain terminates the frame chain. Also, sanity
check against the local store size limit. */
if (backchain != 0 && backchain < SPU_LS_SIZE)
if (status && backchain > 0 && backchain < SPU_LS_SIZE)
{
/* Assume the link register is saved into its slot. */
if (backchain + 16 < SPU_LS_SIZE)