In ktrsyscall() mask the code, otherwise kdump(1) does not show the
correct mib of SYS_sysctl when called by syscall(2).
OK guenther@
-/* $OpenBSD: kern_ktrace.c,v 1.111 2023/02/16 08:50:57 claudio Exp $ */
+/* $OpenBSD: kern_ktrace.c,v 1.112 2023/05/11 09:51:33 bluhm Exp $ */
/* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */
/*
u_int nargs = 0;
int i;
- if (code == SYS_sysctl) {
+ if ((code & KTRC_CODE_MASK) == SYS_sysctl) {
/*
* The sysctl encoding stores the mib[]
* array because it is interesting.