Message ID | 20210822035537.283193-10-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | linux-user: Clean up siginfo_t handling | expand |
On Sun, 22 Aug 2021 at 04:55, Richard Henderson <richard.henderson@linaro.org> wrote: > > These si_codes were changed in 535906c684fca, for linux 4.17. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > linux-user/syscall_defs.h | 1 + > linux-user/alpha/cpu_loop.c | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Peter Maydell <peter.maydell@linaro.org> thanks -- PMM
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index a5ce487dcc..55ccc6ae03 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -715,6 +715,7 @@ typedef struct target_siginfo { #define TARGET_TRAP_TRACE (2) /* process trace trap */ #define TARGET_TRAP_BRANCH (3) /* process taken branch trap */ #define TARGET_TRAP_HWBKPT (4) /* hardware breakpoint/watchpoint */ +#define TARGET_TRAP_UNK (5) /* undiagnosed trap */ struct target_rlimit { abi_ulong rlim_cur; diff --git a/linux-user/alpha/cpu_loop.c b/linux-user/alpha/cpu_loop.c index 7ce2461a02..b2e9503c50 100644 --- a/linux-user/alpha/cpu_loop.c +++ b/linux-user/alpha/cpu_loop.c @@ -99,7 +99,7 @@ void cpu_loop(CPUAlphaState *env) /* BUGCHK */ info.si_signo = TARGET_SIGTRAP; info.si_errno = 0; - info.si_code = 0; + info.si_code = TARGET_TRAP_UNK; info._sifields._sigfault._addr = env->pc; queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; @@ -168,7 +168,7 @@ void cpu_loop(CPUAlphaState *env) break; default: info.si_signo = TARGET_SIGTRAP; - info.si_code = 0; + info.si_code = TARGET_TRAP_UNK; break; } info.si_errno = 0;
These si_codes were changed in 535906c684fca, for linux 4.17. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/syscall_defs.h | 1 + linux-user/alpha/cpu_loop.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.25.1