aboutsummaryrefslogtreecommitdiff
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
commita536c6d7e617a36585e04cb9b75639aa3d8037cd (patch)
treec032177c1a4e1ac99667acbbddd628fe3a9ae6ee /gdb/ppc-linux-tdep.c
parent7845b0133d5bcfc774246573cda7b369e226a6da (diff)
downloadgdb-a536c6d7e617a36585e04cb9b75639aa3d8037cd.zip
gdb-a536c6d7e617a36585e04cb9b75639aa3d8037cd.tar.gz
gdb-a536c6d7e617a36585e04cb9b75639aa3d8037cd.tar.bz2
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 c6e4b83..e623742 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