diff options
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r-- | gdb/ppc-linux-tdep.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 5834b6d..5cf0f23 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -753,7 +753,8 @@ ppc_linux_sigtramp_cache (struct frame_info *next_frame, struct gdbarch *gdbarch = get_frame_arch (next_frame); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - base = frame_unwind_register_unsigned (next_frame, SP_REGNUM); + base = frame_unwind_register_unsigned (next_frame, + gdbarch_sp_regnum (current_gdbarch)); if (bias > 0 && frame_pc_unwind (next_frame) != func) /* See below, some signal trampolines increment the stack as their first instruction, need to compensate for that. */ @@ -772,7 +773,9 @@ ppc_linux_sigtramp_cache (struct frame_info *next_frame, int regnum = i + tdep->ppc_gp0_regnum; trad_frame_set_reg_addr (this_cache, regnum, gpregs + i * tdep->wordsize); } - trad_frame_set_reg_addr (this_cache, PC_REGNUM, gpregs + 32 * tdep->wordsize); + trad_frame_set_reg_addr (this_cache, + gdbarch_pc_regnum (current_gdbarch), + gpregs + 32 * tdep->wordsize); trad_frame_set_reg_addr (this_cache, tdep->ppc_ctr_regnum, gpregs + 35 * tdep->wordsize); trad_frame_set_reg_addr (this_cache, tdep->ppc_lr_regnum, @@ -787,7 +790,7 @@ ppc_linux_sigtramp_cache (struct frame_info *next_frame, /* Floating point registers. */ for (i = 0; i < 32; i++) { - int regnum = i + FP0_REGNUM; + int regnum = i + gdbarch_fp0_regnum (current_gdbarch); trad_frame_set_reg_addr (this_cache, regnum, fpregs + i * tdep->wordsize); } |