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<><invalid>2

They now display correctly:
5202 101546 ktrace   PFLT  0x5ac000 0x2<VM_PROT_WRITE>

MFC after:	1 week
This commit is contained in:
Steven Hartland 2017-03-16 20:55:00 +00:00
parent 3803a97f84
commit aa9bddf0a8
2 changed files with 2 additions and 1 deletions

View File

@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/udp.h>
#include <nfsserver/nfs.h>
#include <ufs/ufs/quota.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <aio.h>
#include <fcntl.h>

View File

@ -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"