mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-03-11 10:50:08 +01:00
(update_frame_state): Handle "cfm" cache.
(Logical change 1.42)
This commit is contained in:
parent
717cb71374
commit
83893355b0
1 changed files with 11 additions and 12 deletions
|
@ -76,7 +76,7 @@ check_rbs_switch (struct cursor *c)
|
||||||
static inline int
|
static inline int
|
||||||
update_frame_state (struct cursor *c)
|
update_frame_state (struct cursor *c)
|
||||||
{
|
{
|
||||||
unw_word_t prev_ip, prev_sp, prev_bsp, ip, pr, num_regs, cfm;
|
unw_word_t prev_ip, prev_sp, prev_bsp, ip, pr, num_regs;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
prev_ip = c->ip;
|
prev_ip = c->ip;
|
||||||
|
@ -84,6 +84,10 @@ update_frame_state (struct cursor *c)
|
||||||
prev_bsp = c->bsp;
|
prev_bsp = c->bsp;
|
||||||
|
|
||||||
c->cfm_loc = c->pfs_loc;
|
c->cfm_loc = c->pfs_loc;
|
||||||
|
/* update the CFM cache: */
|
||||||
|
ret = ia64_get (c, c->cfm_loc, &c->cfm);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
num_regs = 0;
|
num_regs = 0;
|
||||||
if (c->is_signal_frame)
|
if (c->is_signal_frame)
|
||||||
|
@ -102,24 +106,19 @@ update_frame_state (struct cursor *c)
|
||||||
unwind info for sigtramp. Fix it up here. */
|
unwind info for sigtramp. Fix it up here. */
|
||||||
c->ip_loc = (c->sigcontext_loc + SIGCONTEXT_IP_OFF);
|
c->ip_loc = (c->sigcontext_loc + SIGCONTEXT_IP_OFF);
|
||||||
c->cfm_loc = (c->sigcontext_loc + SIGCONTEXT_CFM_OFF);
|
c->cfm_loc = (c->sigcontext_loc + SIGCONTEXT_CFM_OFF);
|
||||||
|
/* update the CFM cache: */
|
||||||
|
ret = ia64_get (c, c->cfm_loc, &c->cfm);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do what can't be described by unwind directives: */
|
/* do what can't be described by unwind directives: */
|
||||||
c->pfs_loc = (c->sigcontext_loc + SIGCONTEXT_AR_PFS_OFF);
|
c->pfs_loc = (c->sigcontext_loc + SIGCONTEXT_AR_PFS_OFF);
|
||||||
|
|
||||||
ret = ia64_get (c, c->cfm_loc, &cfm);
|
num_regs = c->cfm & 0x7f; /* size of frame */
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
num_regs = cfm & 0x7f; /* size of frame */
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
num_regs = (c->cfm >> 7) & 0x7f; /* size of locals */
|
||||||
ret = ia64_get (c, c->cfm_loc, &cfm);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
num_regs = (cfm >> 7) & 0x7f; /* size of locals */
|
|
||||||
}
|
|
||||||
|
|
||||||
if (c->bsp_loc)
|
if (c->bsp_loc)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue