1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-23 12:03:41 +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:
hp.com!davidm 2005-05-20 12:47:59 +00:00
parent 50bbc1fe3d
commit 080f8423d9

View file

@ -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 */
} }