2009-05-02 05:04:19 -04:00
|
|
|
#include <ucontext.h>
|
|
|
|
|
|
|
|
#define FRAME_RETURN_ADDRESS(frame) *((XT *)(frame_successor(frame) + 1) + 1)
|
|
|
|
|
2009-05-04 02:00:30 -04:00
|
|
|
inline static void *ucontext_stack_pointer(void *uap)
|
2009-05-02 05:04:19 -04:00
|
|
|
{
|
|
|
|
ucontext_t *ucontext = (ucontext_t *)uap;
|
|
|
|
return (void *)ucontext->uc_mcontext.uc_regs->gregs[PT_R1];
|
|
|
|
}
|
|
|
|
|
|
|
|
#define UAP_PROGRAM_COUNTER(ucontext) \
|
|
|
|
(((ucontext_t *)(ucontext))->uc_mcontext.uc_regs->gregs[PT_NIP])
|