From 0deb20a334c0ba4554fcb06ab075ea8d94ed5dd5 Mon Sep 17 00:00:00 2001 From: fvdl Date: Mon, 13 Oct 2003 18:41:11 +0000 Subject: [PATCH] Define 32bit versions of signal frames and contexts. --- sys/arch/amd64/include/netbsd32_machdep.h | 105 ++++++++++++---------- 1 file changed, 58 insertions(+), 47 deletions(-) diff --git a/sys/arch/amd64/include/netbsd32_machdep.h b/sys/arch/amd64/include/netbsd32_machdep.h index b0d1ae1b141c..64dd692d7bd8 100644 --- a/sys/arch/amd64/include/netbsd32_machdep.h +++ b/sys/arch/amd64/include/netbsd32_machdep.h @@ -1,63 +1,65 @@ -/* $NetBSD: netbsd32_machdep.h,v 1.3 2003/09/26 18:09:13 christos Exp $ */ +/* $NetBSD: netbsd32_machdep.h,v 1.4 2003/10/13 18:41:11 fvdl Exp $ */ #ifndef _MACHINE_NETBSD32_H_ #define _MACHINE_NETBSD32_H_ +#include + typedef u_int32_t netbsd32_pointer_t; #define NETBSD32PTR64(p32) ((void *)(u_long)(u_int)(p32)) typedef netbsd32_pointer_t netbsd32_sigcontextp_t; struct netbsd32_sigcontext13 { - int sc_gs; - int sc_fs; - int sc_es; - int sc_ds; - int sc_edi; - int sc_esi; - int sc_ebp; - int sc_ebx; - int sc_edx; - int sc_ecx; - int sc_eax; + uint32_t sc_gs; + uint32_t sc_fs; + uint32_t sc_es; + uint32_t sc_ds; + uint32_t sc_edi; + uint32_t sc_esi; + uint32_t sc_ebp; + uint32_t sc_ebx; + uint32_t sc_edx; + uint32_t sc_ecx; + uint32_t sc_eax; /* XXX */ - int sc_eip; - int sc_cs; - int sc_eflags; - int sc_esp; - int sc_ss; + uint32_t sc_eip; + uint32_t sc_cs; + uint32_t sc_eflags; + uint32_t sc_esp; + uint32_t sc_ss; - int sc_onstack; /* sigstack state to restore */ - int sc_mask; /* signal mask to restore (old style) */ + uint32_t sc_onstack; /* sigstack state to restore */ + uint32_t sc_mask; /* signal mask to restore (old style) */ - int sc_trapno; /* XXX should be above */ - int sc_err; + uint32_t sc_trapno; /* XXX should be above */ + uint32_t sc_err; }; struct netbsd32_sigcontext { - int sc_gs; - int sc_fs; - int sc_es; - int sc_ds; - int sc_edi; - int sc_esi; - int sc_ebp; - int sc_ebx; - int sc_edx; - int sc_ecx; - int sc_eax; + uint32_t sc_gs; + uint32_t sc_fs; + uint32_t sc_es; + uint32_t sc_ds; + uint32_t sc_edi; + uint32_t sc_esi; + uint32_t sc_ebp; + uint32_t sc_ebx; + uint32_t sc_edx; + uint32_t sc_ecx; + uint32_t sc_eax; /* XXX */ - int sc_eip; - int sc_cs; - int sc_eflags; - int sc_esp; - int sc_ss; + uint32_t sc_eip; + uint32_t sc_cs; + uint32_t sc_eflags; + uint32_t sc_esp; + uint32_t sc_ss; - int sc_onstack; /* sigstack state to restore */ - int __sc_mask13; /* signal mask to restore (old style) */ + uint32_t sc_onstack; /* sigstack state to restore */ + uint32_t __sc_mask13; /* signal mask to restore (old style) */ - int sc_trapno; /* XXX should be above */ - int sc_err; + uint32_t sc_trapno; /* XXX should be above */ + uint32_t sc_err; sigset_t sc_mask; /* signal mask to restore (new style) */ }; @@ -67,12 +69,21 @@ struct netbsd32_sigcontext { #define sc_pc sc_eip #define sc_ps sc_eflags -struct netbsd32_sigframe { - uint32_t sf_ra; - int sf_signum; - int sf_code; - uint32_t sf_scp; - struct netbsd32_sigcontext sf_sc; +struct netbsd32_sigframe_sigcontext { + uint32_t sf_ra; + int32_t sf_signum; + int32_t sf_code; + uint32_t sf_scp; + struct netbsd32_sigcontext sf_sc; +}; + +struct netbsd32_sigframe_siginfo { + uint32_t sf_ra; + int32_t sf_signum; + uint32_t sf_sip; + uint32_t sf_ucp; + siginfo32_t sf_si; + ucontext32_t sf_uc; }; struct reg32 {