+2002-03-26 Hans Boehm <Hans_Boehm@hp.com>
+ * config/ia64/linux.h (MD_FALLBACK_FRAME_STATE_FOR):
+ Restore more of the signal context. Set no_reg_stack_frame.
+ * config/ia64/unwind-ia64.c (unw_state_record):
+ Add no_reg_stack_frame, comments.
+ (uw_frame_state_for): Initialize when field to UNW_WHEN_NEVER.
+ (uw_update_context): Adjust bsp when unwinding from leaf,
+ but not signal frame.
+
2002-03-26 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/aix51.h (WCHAR_TYPE): Define.
(CONTEXT)->pfs_loc = &(sc_->sc_ar_pfs); \
(CONTEXT)->lc_loc = &(sc_->sc_ar_lc); \
(CONTEXT)->unat_loc = &(sc_->sc_ar_unat); \
+ (CONTEXT)->br_loc[0] = &(sc_->sc_br[0]); \
+ (CONTEXT)->bsp = sc_->sc_ar_bsp; \
(CONTEXT)->pr = sc_->sc_pr; \
(CONTEXT)->psp = sc_->sc_gr[12]; \
+ (CONTEXT)->gp = sc_->sc_gr[1]; \
+ /* Signal frame doesn't have an associated reg. stack frame \
+ other than what we adjust for below. */ \
+ (FS) -> no_reg_stack_frame = 1; \
\
- /* Don't touch the branch registers. The kernel doesn't \
+ /* Don't touch the branch registers o.t. b0. The kernel doesn't \
pass the preserved branch registers in the sigcontext but \
leaves them intact, so there's no need to do anything \
with them here. */ \
unsigned int done : 1; /* are we done scanning descriptors? */
unsigned int any_spills : 1; /* got any register spills? */
unsigned int in_body : 1; /* are we inside a body? */
-
+ unsigned int no_reg_stack_frame : 1; /* Don't adjust bsp for i&l regs */
unsigned char *imask; /* imask of of spill_mask record or NULL */
unsigned long pr_val; /* predicate values */
unsigned long pr_mask; /* predicate mask */
void *lsda; /* language specific data area */
/* Preserved state. */
- unsigned long *bsp_loc; /* previous bsp save location */
+ unsigned long *bsp_loc; /* previous bsp save location
+ Appears to be write-only? */
unsigned long *bspstore_loc;
- unsigned long *pfs_loc;
+ unsigned long *pfs_loc; /* Save location for pfs in current
+ (corr. to sp) frame. Target
+ contains cfm for caller. */
unsigned long *pri_unat_loc;
unsigned long *unat_loc;
unsigned long *lc_loc;
unsigned long *unw, header, length;
unsigned char *insn, *insn_end;
unsigned long segment_base;
+ struct unw_reg_info *r;
memset (fs, 0, sizeof (*fs));
+ for (r = fs->curr.reg; r < fs->curr.reg + UNW_NUM_REGS; ++r)
+ r->when = UNW_WHEN_NEVER;
context->lsda = 0;
ent = _Unwind_FindTableEntry ((void *) context->rp,
/* Unwind BSP for the local registers allocated this frame. */
/* ??? What to do with stored BSP or BSPSTORE registers. */
- if (fs->when_target > fs->curr.reg[UNW_REG_PFS].when)
+ /* We assert that we are either at a call site, or we have
+ just unwound through a signal frame. In either case
+ pfs_loc is valid. */
+ if (!(fs -> no_reg_stack_frame))
{
unsigned long pfs = *context->pfs_loc;
unsigned long sol = (pfs >> 7) & 0x7f;