summaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-tdep.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2011-05-06 20:48:48 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2011-05-06 20:48:48 +0000
commitea5ac2a8cf80109dcf8f470b932cfb25013025f3 (patch)
tree5649df6056c64179f8fdd8e1439b8478439bb54d /gdb/ppc-linux-tdep.c
parentf0a0cc334fd5716ef73b69516bd165d3cb189a9e (diff)
downloadgdb-ea5ac2a8cf80109dcf8f470b932cfb25013025f3.tar.gz
ChangeLog:
* ppc-linux-tdep.c (ppu2spu_prev_register): Handle pseudo registers. (ppu2spu_unwind_register): Mark pseudo registers unavailable. * spu-tdep.c (op_selb): Use correct value. testsuite/ChangeLog: * gdb.cell/bt.exp: Delete breakpoints before running to signal to avoid race condition. * gdb.cell/coremaker.c: Use small stack size. * gdb.cell/ea-standalone.exp: Use file name without path as argument to c_to. * gdb.cell/fork.exp: Allow other output when continuing to end.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r--gdb/ppc-linux-tdep.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index c6e4b838c09..e6237422b9b 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -1367,7 +1367,12 @@ ppu2spu_prev_register (struct frame_info *this_frame,
gdb_byte *buf;
buf = alloca (register_size (gdbarch, regnum));
- regcache_cooked_read (cache->regcache, regnum, buf);
+
+ if (regnum < gdbarch_num_regs (gdbarch))
+ regcache_raw_read (cache->regcache, regnum, buf);
+ else
+ gdbarch_pseudo_register_read (gdbarch, cache->regcache, regnum, buf);
+
return frame_unwind_got_bytes (this_frame, regnum, buf);
}
@@ -1392,9 +1397,9 @@ ppu2spu_unwind_register (void *src, int regnum, gdb_byte *buf)
else if (regnum == SPU_PC_REGNUM)
store_unsigned_integer (buf, 4, byte_order, data->npc);
else
- return 0;
+ return REG_UNAVAILABLE;
- return 1;
+ return REG_VALID;
}
static int