diff --git a/misc/target b/misc/target index 0be7781301..c9f927a507 100755 --- a/misc/target +++ b/misc/target @@ -3,9 +3,15 @@ if [ \( `uname -s ` = FreeBSD \) -a \( `uname -p` = i386 \) ] then echo freebsd-x86-32 +elif [ \( `uname -s` = FreeBSD \) -a \( `uname -m` = amd64 \) ] +then + echo freebsd-x86-64 elif [ \( `uname -s` = OpenBSD \) -a \( `uname -m` = i386 \) ] then echo openbsd-x86-32 +elif [ \( `uname -s` = OpenBSD \) -a \( `uname -m` = amd64 \) ] +then + echo openbsd-x86-64 elif [ \( `uname -s` = Darwin \) -a \( `uname -p` = powerpc \) ] then echo macosx-ppc diff --git a/vm/os-openbsd-x86.64.h b/vm/os-openbsd-x86.64.h index ff225c3cd6..3386e80a4b 100644 --- a/vm/os-openbsd-x86.64.h +++ b/vm/os-openbsd-x86.64.h @@ -1,7 +1,10 @@ +#include + INLINE void *openbsd_stack_pointer(void *uap) { - ucontext_t *ucontext = (ucontext_t *)uap; - return (void *)ucontext->sc_rsp; + struct sigcontext *sc = (struct sigcontext*) uap; + return (void *)sc->sc_rsp; } #define ucontext_stack_pointer openbsd_stack_pointer +#define UAP_PROGRAM_COUNTER(uap) (((struct sigcontext*)(uap))->sc_rip)