mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-12-23 03:53:43 +01:00
Read sp and bsp via ia64_get() and then pass them to common_init().
(Logical change 1.296)
This commit is contained in:
parent
50bbc1fe3d
commit
080f8423d9
1 changed files with 8 additions and 1 deletions
|
@ -33,6 +33,8 @@ unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg)
|
||||||
return -UNW_EINVAL;
|
return -UNW_EINVAL;
|
||||||
#else /* !UNW_LOCAL_ONLY */
|
#else /* !UNW_LOCAL_ONLY */
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
|
unw_word_t sp, bsp;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (tdep_needs_initialization)
|
if (tdep_needs_initialization)
|
||||||
tdep_init ();
|
tdep_init ();
|
||||||
|
@ -49,6 +51,11 @@ unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg)
|
||||||
|
|
||||||
c->as = as;
|
c->as = as;
|
||||||
c->as_arg = as_arg;
|
c->as_arg = as_arg;
|
||||||
return common_init (c);
|
|
||||||
|
if ((ret = ia64_get (c, IA64_REG_LOC (c, UNW_IA64_GR + 12), &sp)) < 0
|
||||||
|
|| (ret = ia64_get (c, IA64_REG_LOC (c, UNW_IA64_AR_BSP), &bsp)) < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
return common_init (c, sp, bsp);
|
||||||
#endif /* !UNW_LOCAL_ONLY */
|
#endif /* !UNW_LOCAL_ONLY */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue