Fix Linux/PPC port
parent
d748c367c0
commit
2da9aa9d18
|
@ -1,4 +1,12 @@
|
||||||
|
#include <ucontext.h>
|
||||||
|
|
||||||
#define FRAME_RETURN_ADDRESS(frame) *((XT *)(frame_successor(frame) + 1) + 1)
|
#define FRAME_RETURN_ADDRESS(frame) *((XT *)(frame_successor(frame) + 1) + 1)
|
||||||
|
|
||||||
|
INLINE void *ucontext_stack_pointer(void *uap)
|
||||||
|
{
|
||||||
|
ucontext_t *ucontext = (ucontext_t *)uap;
|
||||||
|
return (void *)ucontext->uc_mcontext.uc_regs->gregs[PT_R1];
|
||||||
|
}
|
||||||
|
|
||||||
#define UAP_PROGRAM_COUNTER(ucontext) \
|
#define UAP_PROGRAM_COUNTER(ucontext) \
|
||||||
(((ucontext_t *)(ucontext))->uc_mcontext.uc_regs->gregs[PT_NIP])
|
(((ucontext_t *)(ucontext))->uc_mcontext.uc_regs->gregs[PT_NIP])
|
||||||
|
|
|
@ -16,3 +16,9 @@ DLLEXPORT void c_to_factor_toplevel(CELL quot);
|
||||||
extern char ***_NSGetEnviron(void);
|
extern char ***_NSGetEnviron(void);
|
||||||
#define environ (*_NSGetEnviron())
|
#define environ (*_NSGetEnviron())
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
INLINE void *ucontext_stack_pointer(void *uap)
|
||||||
|
{
|
||||||
|
ucontext_t *ucontext = (ucontext_t *)uap;
|
||||||
|
return ucontext->uc_stack.ss_sp;
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#include <ucontext.h>
|
|
||||||
|
|
||||||
INLINE void *ucontext_stack_pointer(void *uap)
|
|
||||||
{
|
|
||||||
ucontext_t *ucontext = (ucontext_t *)uap;
|
|
||||||
return ucontext->uc_stack.ss_sp;
|
|
||||||
}
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include "os-unix.h"
|
#include "os-unix.h"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include "os-unix-ucontext.h"
|
|
||||||
#include "os-macosx.h"
|
#include "os-macosx.h"
|
||||||
#include "mach_signal.h"
|
#include "mach_signal.h"
|
||||||
|
|
||||||
|
@ -84,7 +83,6 @@
|
||||||
#if defined(FACTOR_X86)
|
#if defined(FACTOR_X86)
|
||||||
#include "os-linux-x86.32.h"
|
#include "os-linux-x86.32.h"
|
||||||
#elif defined(FACTOR_PPC)
|
#elif defined(FACTOR_PPC)
|
||||||
#include "os-unix-ucontext.h"
|
|
||||||
#include "os-linux-ppc.h"
|
#include "os-linux-ppc.h"
|
||||||
#elif defined(FACTOR_ARM)
|
#elif defined(FACTOR_ARM)
|
||||||
#include "os-linux-arm.h"
|
#include "os-linux-arm.h"
|
||||||
|
|
Loading…
Reference in New Issue