diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-07-12 22:42:52 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-07-12 22:42:52 +0000 |
commit | cdc9523a4dd8e0eda4d3a801aeee9a2f1c7a24d3 (patch) | |
tree | d5891b4eee19f5e4bba06d37999ee56f1f26e4ad | |
parent | 836acd6d9a441506d62187829dd0f78774c61e9f (diff) | |
download | fsf-binutils-gdb-cdc9523a4dd8e0eda4d3a801aeee9a2f1c7a24d3.zip fsf-binutils-gdb-cdc9523a4dd8e0eda4d3a801aeee9a2f1c7a24d3.tar.gz fsf-binutils-gdb-cdc9523a4dd8e0eda4d3a801aeee9a2f1c7a24d3.tar.bz2 |
* spu-tdep.c (spu_frame_unwind_cache): Do not error if
backchain is unreadable.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/spu-tdep.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a1b64f8..9ca905b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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". (spu_child_post_startup_inferior): Register main thread. (spu_child_post_attach): Likewise. diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index aaa9879..fe04959 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -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) |