CORE_ADDR addr, base;
int i;
- base = frame_unwind_register_unsigned (next_frame, SP_REGNUM);
+ base = frame_unwind_register_unsigned (next_frame,
+ gdbarch_sp_regnum (current_gdbarch));
if (self == &ppcnbsd2_sigtramp)
addr = base + 0x10 + 2 * tdep->wordsize;
else
addr += tdep->wordsize;
trad_frame_set_reg_addr (this_cache, tdep->ppc_ctr_regnum, addr);
addr += tdep->wordsize;
- trad_frame_set_reg_addr (this_cache, PC_REGNUM, addr); /* SRR0? */
+ trad_frame_set_reg_addr (this_cache,
+ gdbarch_pc_regnum (current_gdbarch),
+ addr); /* SRR0? */
addr += tdep->wordsize;
/* Construct the frame ID using the function start. */