factor/vm/os-linux-ppc.h

13 lines
378 B
C
Raw Normal View History

2008-04-09 17:58:55 -04:00
#include <ucontext.h>
2007-10-05 17:30:10 -04:00
#define FRAME_RETURN_ADDRESS(frame) *((XT *)(frame_successor(frame) + 1) + 1)
2007-09-20 18:09:08 -04:00
2008-04-09 17:58:55 -04:00
INLINE void *ucontext_stack_pointer(void *uap)
{
ucontext_t *ucontext = (ucontext_t *)uap;
return (void *)ucontext->uc_mcontext.uc_regs->gregs[PT_R1];
}
2007-09-20 18:09:08 -04:00
#define UAP_PROGRAM_COUNTER(ucontext) \
(((ucontext_t *)(ucontext))->uc_mcontext.uc_regs->gregs[PT_NIP])