Revision 58d9b1e0 cpu-exec.c
b/cpu-exec.c | ||
---|---|---|
924 | 924 |
# define TRAP_sig(context) REG_sig(trap, context) |
925 | 925 |
#endif /* linux */ |
926 | 926 |
|
927 |
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) |
|
928 |
#include <ucontext.h> |
|
929 |
# define IAR_sig(context) ((context)->uc_mcontext.mc_srr0) |
|
930 |
# define MSR_sig(context) ((context)->uc_mcontext.mc_srr1) |
|
931 |
# define CTR_sig(context) ((context)->uc_mcontext.mc_ctr) |
|
932 |
# define XER_sig(context) ((context)->uc_mcontext.mc_xer) |
|
933 |
# define LR_sig(context) ((context)->uc_mcontext.mc_lr) |
|
934 |
# define CR_sig(context) ((context)->uc_mcontext.mc_cr) |
|
935 |
/* Exception Registers access */ |
|
936 |
# define DAR_sig(context) ((context)->uc_mcontext.mc_dar) |
|
937 |
# define DSISR_sig(context) ((context)->uc_mcontext.mc_dsisr) |
|
938 |
# define TRAP_sig(context) ((context)->uc_mcontext.mc_exc) |
|
939 |
#endif /* __FreeBSD__|| __FreeBSD_kernel__ */ |
|
940 |
|
|
927 | 941 |
#ifdef __APPLE__ |
928 | 942 |
# include <sys/ucontext.h> |
929 | 943 |
typedef struct ucontext SIGCONTEXT; |
... | ... | |
953 | 967 |
void *puc) |
954 | 968 |
{ |
955 | 969 |
siginfo_t *info = pinfo; |
970 |
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) |
|
971 |
ucontext_t *uc = puc; |
|
972 |
#else |
|
956 | 973 |
struct ucontext *uc = puc; |
974 |
#endif |
|
957 | 975 |
unsigned long pc; |
958 | 976 |
int is_write; |
959 | 977 |
|
Also available in: Unified diff