1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-16 05:08:12 +01:00

(linux_interrupt): Enable this code for the kernel, too.

Use ia64_get_abi_marker() instead of c->abi_marker.
	Use ia64_set_abi() instead of storing directly to c->as->abi.

(Logical change 1.294)
This commit is contained in:
hp.com!davidm 2005-05-20 09:48:08 +00:00
parent ee6eeb4f7d
commit 6675be4926

View file

@ -64,10 +64,7 @@ static inline int
linux_interrupt (struct cursor *c, ia64_loc_t prev_cfm_loc, linux_interrupt (struct cursor *c, ia64_loc_t prev_cfm_loc,
unw_word_t *num_regsp, int marker) unw_word_t *num_regsp, int marker)
{ {
#if defined(UNW_LOCAL_ONLY) #if defined(UNW_LOCAL_ONLY) && !(defined(__linux) && defined(__KERNEL__))
/* Perhaps libunwind will some day become the Linux kernel unwinder.
Until such time, linux_interrupt() is needed only for non-local
unwinding. */
return -UNW_EINVAL; return -UNW_EINVAL;
#else #else
unw_word_t sc_addr, num_regs; unw_word_t sc_addr, num_regs;
@ -272,25 +269,25 @@ update_frame_state (struct cursor *c)
if (unlikely (c->abi_marker)) if (unlikely (c->abi_marker))
{ {
c->last_abi_marker = c->abi_marker; c->last_abi_marker = c->abi_marker;
switch (c->abi_marker) switch (ia64_get_abi_marker (c))
{ {
case ABI_MARKER_LINUX_SIGTRAMP: case ABI_MARKER_LINUX_SIGTRAMP:
case ABI_MARKER_OLD_LINUX_SIGTRAMP: case ABI_MARKER_OLD_LINUX_SIGTRAMP:
c->as->abi = ABI_LINUX; ia64_set_abi (c, ABI_LINUX);
if ((ret = linux_sigtramp (c, prev_cfm_loc, &num_regs)) < 0) if ((ret = linux_sigtramp (c, prev_cfm_loc, &num_regs)) < 0)
return ret; return ret;
break; break;
case ABI_MARKER_OLD_LINUX_INTERRUPT: case ABI_MARKER_OLD_LINUX_INTERRUPT:
case ABI_MARKER_LINUX_INTERRUPT: case ABI_MARKER_LINUX_INTERRUPT:
c->as->abi = ABI_LINUX; ia64_set_abi (c, ABI_LINUX);
if ((ret = linux_interrupt (c, prev_cfm_loc, &num_regs, if ((ret = linux_interrupt (c, prev_cfm_loc, &num_regs,
c->abi_marker)) < 0) c->abi_marker)) < 0)
return ret; return ret;
break; break;
case ABI_MARKER_HP_UX_SIGTRAMP: case ABI_MARKER_HP_UX_SIGTRAMP:
c->as->abi = ABI_HPUX; ia64_set_abi (c, ABI_HPUX);
if ((ret = hpux_sigtramp (c, prev_cfm_loc, &num_regs)) < 0) if ((ret = hpux_sigtramp (c, prev_cfm_loc, &num_regs)) < 0)
return ret; return ret;
break; break;
@ -360,6 +357,6 @@ unw_step (unw_cursor_t *cursor)
&& (ret = update_frame_state (c)) >= 0) && (ret = update_frame_state (c)) >= 0)
ret = (c->ip == 0) ? 0 : 1; ret = (c->ip == 0) ? 0 : 1;
Debug (2, "returning %d\n", ret); Debug (2, "returning %d (ip=0x%016lx)\n", ret, (unsigned long) c->ip);
return ret; return ret;
} }