]> git.proxmox.com Git - mirror_qemu.git/commitdiff
linux-user/alpha: Set TRAP_UNK for bugchk and unknown gentrap
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 7 Jan 2022 21:32:20 +0000 (13:32 -0800)
committerLaurent Vivier <laurent@vivier.eu>
Tue, 11 Jan 2022 17:40:43 +0000 (18:40 +0100)
These si_codes were changed in 535906c684fca, for linux 4.17.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220107213243.212806-2-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/alpha/cpu_loop.c
linux-user/syscall_defs.h

index 37c33f0ccd07ef237b45d6da9c61f99cb2faea69..96466b23f969042d52c81b3d7cafd7743320c615 100644 (file)
@@ -86,7 +86,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;
@@ -155,7 +155,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;
index cca561f62268ddc4546c61c3e64ede005e6a10a2..18bed558fe6b4d205108e68da8db8af6487610b6 100644 (file)
@@ -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;