From 4a0d7bd478f375abfac583582531a90f30b51fb6 Mon Sep 17 00:00:00 2001 From: "hp.com!davidm" Date: Thu, 19 Feb 2004 01:37:27 +0000 Subject: [PATCH] (access_nat): Correct the case where a static general register got saved to a stacked register. We can't use ia64_get_stacked() here because c->rbs will, in general, be different from the frame in which the register was saved. (Logical change 1.173) --- src/ia64/Gregs-ia64.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/ia64/Gregs-ia64.c b/src/ia64/Gregs-ia64.c index c8b5437b..ad5ddf69 100644 --- a/src/ia64/Gregs-ia64.c +++ b/src/ia64/Gregs-ia64.c @@ -325,13 +325,17 @@ access_nat (struct cursor *c, ia64_loc_t loc, ia64_loc_t reg_loc, } else if (reg >= 32) { + struct rbs_area *rbs; + unw_word_t reg_addr = IA64_GET_ADDR (reg_loc); + /* NaT bit is saved in a stacked register. */ - reg = rotate_gr (c, reg); - ret = ia64_get_stacked (c, reg, ®_loc, &nat_loc); - if (ret < 0) - return ret; assert (!IA64_IS_REG_LOC (reg_loc)); - mask = (unw_word_t) 1 << ia64_rse_slot_num (IA64_GET_ADDR (reg_loc)); + + rbs = rbs_find (c, reg_addr); + if (!rbs) + return -UNW_EBADREG; + nat_loc = rbs_get_rnat_loc (rbs, reg_addr); + mask = (unw_word_t) 1 << ia64_rse_slot_num (reg_addr); } else {