From c7d772502a29404220cd08490e49222e39941c88 Mon Sep 17 00:00:00 2001 From: mpi Date: Fri, 28 Apr 2017 13:53:05 +0000 Subject: [PATCH] Display futex(2) operations and arguments. --- usr.bin/kdump/kdump.c | 5 ++++- usr.bin/kdump/kdump_subr.h | 3 ++- usr.bin/kdump/mksubr | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index da5c51ce0db..850e6eb9160 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kdump.c,v 1.129 2016/07/18 09:36:50 guenther Exp $ */ +/* $OpenBSD: kdump.c,v 1.130 2017/04/28 13:53:05 mpi Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -551,6 +551,7 @@ static void (*formatters[])(int) = { uidname, gidname, syslogflagname, + futexflagname, }; enum { @@ -634,6 +635,7 @@ enum { Uidname, Gidname, Syslogflagname, + Futexflagname, }; #define Pptr Phexlong @@ -730,6 +732,7 @@ static const formatter scargs[][8] = { [SYS_getgroups] = { Pcount, Pptr }, [SYS_setgroups] = { Pcount, Pptr }, [SYS_setpgid] = { Ppid_t, Ppid_t }, + [SYS_futex] = { Pptr, Futexflagname, Pcount, Pptr, Pptr }, [SYS_sendsyslog] = { Pptr, Psize, Syslogflagname }, [SYS_utimensat] = { Atfd, Ppath, Pptr, Atflagsname }, [SYS_futimens] = { Pfd, Pptr }, diff --git a/usr.bin/kdump/kdump_subr.h b/usr.bin/kdump/kdump_subr.h index 571dbc78c95..632040b0a3a 100644 --- a/usr.bin/kdump/kdump_subr.h +++ b/usr.bin/kdump/kdump_subr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kdump_subr.h,v 1.20 2016/06/07 06:12:37 deraadt Exp $ */ +/* $OpenBSD: kdump_subr.h,v 1.21 2017/04/28 13:53:05 mpi Exp $ */ /* * Copyright(c) 2006 2006 David Kirchner * @@ -97,5 +97,6 @@ void evflagsname(int); void evfflagsname(int, int); void pollfdeventname(int); void syslogflagname(int); +void futexflagname(int); extern int decimal, fancy, basecol, arg1; diff --git a/usr.bin/kdump/mksubr b/usr.bin/kdump/mksubr index 039d93d880d..ece75fc967c 100644 --- a/usr.bin/kdump/mksubr +++ b/usr.bin/kdump/mksubr @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: mksubr,v 1.31 2016/06/07 06:12:37 deraadt Exp $ +# $OpenBSD: mksubr,v 1.32 2017/04/28 13:53:05 mpi Exp $ # # Copyright (c) 2006 David Kirchner # @@ -301,6 +301,7 @@ cat <<_EOF_ #endif #include #include +#include #include "kdump_subr.h" @@ -363,6 +364,7 @@ auto_orz_type "pollfdeventname" "POLL[^_][[:alnum:]_]+[[:space:]]+0x" "sys/poll. # exclude EV_{SYSFLAGS,FLAG1} auto_orz_type "evflagsname" "EV_[^S][A-Z]+[[:space:]]+0x" "sys/event.h" auto_orz_type "syslogflagname" "LOG_[A-Z]+[[:space:]]+0x0*[1248]0*[[:space:]]" "sys/syslog.h" +auto_orz_type "futexflagname" "FUTEX_[A-Z_]+[[:space:]]+[0-9]+" "sys/futex.h" cat <<_EOF_ /* -- 2.20.1