[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 15/20] bsd-user: Add SIGSYS to core dump signals.
From: |
Warner Losh |
Subject: |
[PATCH v3 15/20] bsd-user: Add SIGSYS to core dump signals. |
Date: |
Tue, 11 Apr 2023 11:09:50 -0600 |
SIGSYS creates a core by default if uncaught. Follow that here. Sort
with the same order as is in the kernel.
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
bsd-user/signal.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/bsd-user/signal.c b/bsd-user/signal.c
index f4e078ee1da..4301595cc2f 100644
--- a/bsd-user/signal.c
+++ b/bsd-user/signal.c
@@ -330,17 +330,22 @@ int block_signals(void)
return qatomic_xchg(&ts->signal_pending, 1);
}
-/* Returns 1 if given signal should dump core if not handled. */
+/*
+ * Returns 1 if given signal should dump core if not handled.
+ * Compare with kern_sig.c sigproptbl[].
+ */
static int core_dump_signal(int sig)
{
switch (sig) {
+ case TARGET_SIGQUIT:
+ case TARGET_SIGILL:
+ case TARGET_SIGTRAP:
case TARGET_SIGABRT:
+ case TARGET_SIGEMT:
case TARGET_SIGFPE:
- case TARGET_SIGILL:
- case TARGET_SIGQUIT:
case TARGET_SIGSEGV:
- case TARGET_SIGTRAP:
case TARGET_SIGBUS:
+ case TARGET_SIGSYS:
return 1;
default:
return 0;
--
2.40.0
- [PATCH v3 04/20] bsd-user: Move system FreeBSD call table to freebsd/os-syscall.c, (continued)
- [PATCH v3 04/20] bsd-user: Move system FreeBSD call table to freebsd/os-syscall.c, Warner Losh, 2023/04/11
- [PATCH v3 06/20] bsd-user: Remove OpenBSD specific syscall printing, Warner Losh, 2023/04/11
- [PATCH v3 12/20] bsd-user: Implement do_sysctl_kern_proc_vmmap, Warner Losh, 2023/04/11
- [PATCH v3 05/20] bsd-user: Remove NetBSD specific syscall printing, Warner Losh, 2023/04/11
- [PATCH v3 03/20] bsd-user: Cleanup style., Warner Losh, 2023/04/11
- [PATCH v3 09/20] bsd-user: h2g_rusage, Warner Losh, 2023/04/11
- [PATCH v3 13/20] bsd-user: Implement sysctl kern.proc, except kern.proc.full_path, Warner Losh, 2023/04/11
- [PATCH v3 14/20] bsd-user: Implement core dumps, Warner Losh, 2023/04/11
- [PATCH v3 16/20] bsd-user: Implement SIGSYS on arm, Warner Losh, 2023/04/11
- [PATCH v3 20/20] bsd-user: Eliminate USE_ELF_CORE_DUMP, Warner Losh, 2023/04/11
- [PATCH v3 15/20] bsd-user: Add SIGSYS to core dump signals.,
Warner Losh <=
- [PATCH v3 08/20] bsd-user: Remove useless mmap definitions, Warner Losh, 2023/04/11
- [PATCH v3 10/20] bsd-user: Implement do_sysctl_kern_getprocs, Warner Losh, 2023/04/11
- [PATCH v3 17/20] bsd-user: Remove host-os.h, Warner Losh, 2023/04/11
- [PATCH v3 07/20] bsd-user: Move system call include to os-syscall.h, Warner Losh, 2023/04/11
- [PATCH v3 18/20] bsd-user: Automatically generate syscall_nr.h, Warner Losh, 2023/04/11
- [PATCH v3 19/20] bsd-user: remove syscall_nr.h, Warner Losh, 2023/04/11
- [PATCH v3 11/20] bsd-user: Implement do_sysctl_kern_proc_filedesc, Warner Losh, 2023/04/11