-/* $OpenBSD: kdump.c,v 1.150 2022/09/08 16:04:31 mbuhl Exp $ */
+/* $OpenBSD: kdump.c,v 1.151 2022/12/19 22:55:12 guenther Exp $ */
/*-
* Copyright (c) 1988, 1993
static void clockname(int);
static void sockoptlevelname(int);
static void ktraceopname(int);
+static void idtypeandid(int);
static int screenwidth;
gidname,
syslogflagname,
futexflagname,
+ waitidoptname,
+ idtypeandid,
};
enum {
Gidname,
Syslogflagname,
Futexflagname,
+ Waitidoptname,
+ Idtypeandid,
};
#define Pptr Phexlong
#define Msgflgname Phexlong /* to be added */
+/* includes relevant entries as of syscalls.master rev 1.238 */
typedef signed char formatter;
static const formatter scargs[][8] = {
[SYS_exit] = { Pdecint },
[SYS_adjtime] = { Pptr, Pptr },
[SYS_quotactl] = { Ppath, Quotactlname, Uidname, Pptr },
[SYS_nfssvc] = { Phexint, Pptr },
+ [SYS_mimmutable] = { Pptr, Pbigsize },
+ [SYS_waitid] = { PASS_TWO, Idtypeandid, Pptr, Waitidoptname },
[SYS_getfh] = { Ppath, Pptr },
[SYS_sysarch] = { Pdecint, Pptr },
[SYS_pread] = { Pfd, Pptr, Pbigsize, Poff_t, END64 },
if (invalid || (ops & ~(KTROP((unsigned)-1) | KTRFLAG_DESCEND)))
(void)printf("<invalid>%d", ops);
}
+
+static void
+idtypeandid(int id)
+{
+ switch (arg1) {
+ case P_PID:
+ printf("P_PID,%d", id);
+ break;
+ case P_PGID:
+ printf("P_PGID,%d", id);
+ break;
+ case P_ALL:
+ printf("P_ALL,<unused>%d", id);
+ break;
+ default: /* Should not reach */
+ printf("<invalid=%d>, <unused>%d", arg1, id);
+ }
+}
-/* $OpenBSD: kdump_subr.h,v 1.22 2018/11/05 17:05:50 anton Exp $ */
+/* $OpenBSD: kdump_subr.h,v 1.23 2022/12/19 22:55:12 guenther Exp $ */
/*
* Copyright(c) 2006 2006 David Kirchner <dpk@dpk.net>
*
void mmapprotname(int);
void mmapflagsname(int);
void wait4optname(int);
+void waitidoptname(int);
void sendrecvflagsname(int);
void getfsstatflagsname(int);
void mountflagsname(int);
#!/bin/sh
-# $OpenBSD: mksubr,v 1.38 2022/02/22 17:35:01 deraadt Exp $
+# $OpenBSD: mksubr,v 1.39 2022/12/19 22:55:12 guenther Exp $
#
# Copyright (c) 2006 David Kirchner <dpk@dpk.net>
#
auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "sys/unistd.h"
auto_or_type "mmapprotname" "PROT_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h"
auto_or_type "mmapflagsname" "(__)?MAP_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h"
-auto_orz_type "wait4optname" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h"
+auto_orz_type "wait4optname" "W(NOHANG|UNTRACED|CONTINUED)[[:space:]]+[0-9]+" "sys/wait.h"
+auto_or_type "waitidoptname" "W(NO[A-Z]+|[A-T][A-Z]*ED)[[:space:]]+([0-9]+|W[A-Z]+)" "sys/wait.h"
#auto_or_type "timerflagsname" "TIMER_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/time.h"
#auto_or_type "getfsstatflagsname" "MNT_[A-Z]+[[:space:]]+[1-9][0-9]*" "sys/mount.h"
auto_orz_type "mountflagsname" "MNT_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mount.h"