+2016-11-22 Yao Qi <yao.qi@linaro.org>
+
+ * spu-tdep.c (spu_software_single_step): Call get_regcache_arch
+ instead of get_frame_arch. Call regcache_read_pc instead of
+ get_frame_pc. Call regcache_raw_get_unsigned instead of
+ get_frame_register_unsigned.
+
2016-11-22 Yao Qi <yao.qi@linaro.org>
* tic6x-tdep.c (tic6x_condition_true): Replace frame with
static VEC (CORE_ADDR) *
spu_software_single_step (struct frame_info *frame)
{
- struct gdbarch *gdbarch = get_frame_arch (frame);
+ struct regcache *regcache = get_current_regcache ();
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR pc, next_pc;
unsigned int insn;
ULONGEST lslr;
VEC (CORE_ADDR) *next_pcs = NULL;
- pc = get_frame_pc (frame);
+ pc = regcache_read_pc (regcache);
if (target_read_memory (pc, buf, 4))
throw_error (MEMORY_ERROR, _("Could not read instruction at %s."),
insn = extract_unsigned_integer (buf, 4, byte_order);
/* Get local store limit. */
- lslr = get_frame_register_unsigned (frame, SPU_LSLR_REGNUM);
+ lslr = regcache_raw_get_unsigned (regcache, SPU_LSLR_REGNUM);
if (!lslr)
lslr = (ULONGEST) -1;
if (reg == SPU_PC_REGNUM)
target += SPUADDR_ADDR (pc);
else if (reg != -1)
- target += get_frame_register_unsigned (frame, reg) & -4;
+ target += regcache_raw_get_unsigned (regcache, reg) & -4;
target = target & lslr;
if (target != next_pc)