From 6f99cb26f2eff3e4b8ccd5ea86dd345ba9bb8fe9 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Wed, 2 Oct 2002 21:18:57 +0000 Subject: [PATCH] 2002-10-02 Andrew Cagney * rs6000-tdep.c (skip_prologue): Bias alloca_reg by ppc_gp0_regnum. --- gdb/ChangeLog | 4 ++++ gdb/rs6000-tdep.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 041f2e6f970..f210799b4bb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2002-10-02 Andrew Cagney + + * rs6000-tdep.c (skip_prologue): Bias alloca_reg by ppc_gp0_regnum. + 2002-10-02 Marko Mlinar * MAINTAINERS: Add myself to the Write After Approval list. diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 57d3500a842..152eb0e3a0c 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -465,6 +465,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata) int prev_insn_was_prologue_insn = 1; int num_skip_non_prologue_insns = 0; const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (current_gdbarch); + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); /* Attempt to find the end of the prologue when no limit is specified. Note that refine_prologue_limit() has been written so that it may @@ -694,7 +695,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata) { /* mr r31, r1 */ fdata->frameless = 0; framep = 1; - fdata->alloca_reg = 31; + fdata->alloca_reg = (tdep->ppc_gp0_regnum + 31); continue; /* Another way to set up the frame pointer. */ @@ -703,7 +704,8 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata) { /* addi rX, r1, 0x0 */ fdata->frameless = 0; framep = 1; - fdata->alloca_reg = (op & ~0x38010000) >> 21; + fdata->alloca_reg = (tdep->ppc_gp0_regnum + + ((op & ~0x38010000) >> 21)); continue; } /* AltiVec related instructions. */ -- 2.30.2