1 2 static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscall_arg *arg) 3 { 4 int sig = arg->val; 5 6 switch (sig) { 7 #define P_SIGNUM(n) case SIG##n: return scnprintf(bf, size, #n) 8 P_SIGNUM(HUP); 9 P_SIGNUM(INT); 10 P_SIGNUM(QUIT); 11 P_SIGNUM(ILL); 12 P_SIGNUM(TRAP); 13 P_SIGNUM(ABRT); 14 P_SIGNUM(BUS); 15 P_SIGNUM(FPE); 16 P_SIGNUM(KILL); 17 P_SIGNUM(USR1); 18 P_SIGNUM(SEGV); 19 P_SIGNUM(USR2); 20 P_SIGNUM(PIPE); 21 P_SIGNUM(ALRM); 22 P_SIGNUM(TERM); 23 P_SIGNUM(CHLD); 24 P_SIGNUM(CONT); 25 P_SIGNUM(STOP); 26 P_SIGNUM(TSTP); 27 P_SIGNUM(TTIN); 28 P_SIGNUM(TTOU); 29 P_SIGNUM(URG); 30 P_SIGNUM(XCPU); 31 P_SIGNUM(XFSZ); 32 P_SIGNUM(VTALRM); 33 P_SIGNUM(PROF); 34 P_SIGNUM(WINCH); 35 P_SIGNUM(IO); 36 P_SIGNUM(PWR); 37 P_SIGNUM(SYS); 38 #ifdef SIGEMT 39 P_SIGNUM(EMT); 40 #endif 41 #ifdef SIGSTKFLT 42 P_SIGNUM(STKFLT); 43 #endif 44 #ifdef SIGSWI 45 P_SIGNUM(SWI); 46 #endif 47 default: break; 48 } 49 50 return scnprintf(bf, size, "%#x", sig); 51 } 52 53 #define SCA_SIGNUM syscall_arg__scnprintf_signum 54