From aa9bddf0a82e166f2ff8bedab4e78a704dcf94a2 Mon Sep 17 00:00:00 2001 From: Steven Hartland Date: Thu, 16 Mar 2017 20:55:00 +0000 Subject: [PATCH] Fix libsysdecode vmprot flag decoding Fix the regex used to find vmprot table entries and add the missing include. This fixes kdumps output of PFLT arguments which would previously look like: 5202 101546 ktrace PFLT 0x5ae000 0x2<>2 They now display correctly: 5202 101546 ktrace PFLT 0x5ac000 0x2 MFC after: 1 week --- lib/libsysdecode/flags.c | 1 + lib/libsysdecode/mktables | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libsysdecode/flags.c b/lib/libsysdecode/flags.c index 6d0117fdb58..b4749bfcc09 100644 --- a/lib/libsysdecode/flags.c +++ b/lib/libsysdecode/flags.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/lib/libsysdecode/mktables b/lib/libsysdecode/mktables index 6c44a054107..101b4f8da52 100644 --- a/lib/libsysdecode/mktables +++ b/lib/libsysdecode/mktables @@ -135,7 +135,7 @@ gen_table "sockoptudp" "UDP_[[:alnum:]]+[[:space:]]+[0-9]+" "neti gen_table "socktype" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h" gen_table "thrcreateflags" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" gen_table "umtxop" "UMTX_OP_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/umtx.h" -gen_table "vmprot" "VM_PROT_[A-Z]+[[:space:]]+\(\(vm_prot_t\)\)" "vm/vm.h" +gen_table "vmprot" "VM_PROT_[A-Z]+[[:space:]]+\(\(vm_prot_t\)[[:space:]]+0x[0-9]+\)" "vm/vm.h" gen_table "vmresult" "KERN_[A-Z]+[[:space:]]+[0-9]+" "vm/vm_param.h" gen_table "wait6opt" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" gen_table "seekwhence" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h"