diff options
Diffstat (limited to 'asmrun/signals_osdep.h')
-rw-r--r-- | asmrun/signals_osdep.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/asmrun/signals_osdep.h b/asmrun/signals_osdep.h index 3a4a8fc670..65b5e17bc6 100644 --- a/asmrun/signals_osdep.h +++ b/asmrun/signals_osdep.h @@ -76,6 +76,25 @@ #define CONTEXT_SP (CONTEXT_STATE.CONTEXT_REG(rsp)) #define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr) +/****************** ARM, Linux */ + +#elif defined(TARGET_arm) && defined (SYS_linux) + + #include <sys/ucontext.h> + + #define DECLARE_SIGNAL_HANDLER(name) \ + static void name(int sig, siginfo_t * info, ucontext_t * context) + + #define SET_SIGACT(sigact,name) \ + sigact.sa_sigaction = (void (*)(int,siginfo_t *,void *)) (name); \ + sigact.sa_flags = SA_SIGINFO + + typedef unsigned long context_reg; + #define CONTEXT_PC (context->uc_mcontext.arm_pc) + #define CONTEXT_EXCEPTION_POINTER (context->uc_mcontext.arm_fp) + #define CONTEXT_YOUNG_PTR (context->uc_mcontext.arm_r8) + #define CONTEXT_FAULTING_ADDRESS ((char *) context->uc_mcontext.fault_address) + /****************** I386, Linux */ #elif defined(TARGET_i386) && defined(SYS_linux_elf) |