From 644a56edfcafb63fde1670fc5a1730ca123bfdc2 Mon Sep 17 00:00:00 2001 From: "mostang.com!davidm" Date: Tue, 21 Jan 2003 17:41:20 +0000 Subject: [PATCH] (unw_init_local): Add comment as to why we can assume initial register window is contiguous. (Logical change 1.40) --- src/ia64/Ginit_local-ia64.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ia64/Ginit_local-ia64.c b/src/ia64/Ginit_local-ia64.c index f63f071e..ae6b0a9e 100644 --- a/src/ia64/Ginit_local-ia64.c +++ b/src/ia64/Ginit_local-ia64.c @@ -1,5 +1,5 @@ /* libunwind - a platform-independent unwind library - Copyright (C) 2001-2002 Hewlett-Packard Co + Copyright (C) 2001-2003 Hewlett-Packard Co Contributed by David Mosberger-Tang This file is part of libunwind. @@ -45,7 +45,6 @@ unw_init_local (unw_cursor_t *cursor, ucontext_t *uc) { struct cursor *c = (struct cursor *) cursor; unw_word_t sol; - int ret; if (unw.needs_initialization) { @@ -56,7 +55,11 @@ unw_init_local (unw_cursor_t *cursor, ucontext_t *uc) /* The bsp value stored by getcontext() points to the *end* of the register frame of the initial function. We correct for this by storing the adjusted value in sc_rbs_base, which isn't used by - getcontext()/setcontext(). */ + getcontext()/setcontext(). We can be certain that the entire + frame is stored in a contiguous rbs-area because the frame didn't + become part of the dirty partition until getcontext() was called + and we know that getcontext() doesn't switch the register-backing + store. */ sol = (uc->uc_mcontext.sc_ar_pfs >> 7) & 0x7f; uc->uc_mcontext.sc_rbs_base = ia64_rse_skip_regs (uc->uc_mcontext.sc_ar_bsp, -sol);