diff --git a/src/ia64/unwind_i.h b/src/ia64/unwind_i.h index db2d0ca4..46474be1 100644 --- a/src/ia64/unwind_i.h +++ b/src/ia64/unwind_i.h @@ -312,7 +312,7 @@ struct ia64_labeled_state #define ia64_init UNW_ARCH_OBJ(init) #define rbs_record_switch UNW_ARCH_OBJ(rbs_record_switch) #define rbs_underflow UNW_ARCH_OBJ(rbs_underflow) -#define rbs_find_reg UNW_ARCH_OBJ(rbs_find_reg) +#define rbs_find_stacked UNW_ARCH_OBJ(rbs_find_stacked) extern int ia64_make_proc_info (struct cursor *c); extern int ia64_create_state_record (struct cursor *c, @@ -332,28 +332,28 @@ extern void __ia64_install_context (const ucontext_t *ucp, long r15, long r16, __attribute__ ((noreturn)); extern int ia64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg); -extern int rbs_record_switch (struct cursor *c, unw_word_t saved_bsp, - unw_word_t saved_bspstore, +extern int rbs_record_switch (struct cursor *c, + unw_word_t saved_bsp, unw_word_t saved_bspstore, unw_word_t saved_rnat_loc); extern void rbs_underflow (struct cursor *c); extern int rbs_find_stacked (struct cursor *c, unw_word_t regs_to_skip, unw_word_t *locp, unw_word_t *rnat_locp); static inline int -ia64_get_stacked (struct cursor *c, unw_word_t regs_to_skip, +ia64_get_stacked (struct cursor *c, unw_word_t reg, unw_word_t *locp, unw_word_t *rnat_locp) { struct rbs_area *rbs = c->rbs_area + c->rbs_curr; - unw_word_t loc; + unw_word_t loc, regs_to_skip = reg - 32; int ret = 0; - assert (regs_to_skip < 96); + assert (reg >= 32 && reg < 128); *locp = loc = ia64_rse_skip_regs (c->bsp, regs_to_skip); if (rnat_locp) *rnat_locp = ia64_rse_rnat_addr (loc); - if (unlikely (rbs->end - loc >= rbs->size)) + if (unlikely (loc >= rbs->end)) ret = rbs_find_stacked (c, regs_to_skip, locp, rnat_locp); return ret; }