Decode pathconf() names, *at() flags, and sysarch() numbers in libsysdecode.

Move tables that were previously in truss over to libsysdecode.  truss
output is unchanged, but kdump has been updated to decode these fields.
In addition, sysdecode_sysarch_number() should support all platforms
whereas the old table in truss only supported x86.
This commit is contained in:
John Baldwin
2017-09-04 05:34:36 +00:00
parent ff6ea3fbc5
commit 39a3a4386a
8 changed files with 98 additions and 35 deletions
+45
View File
@@ -1060,6 +1060,15 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags)
ip++;
narg--;
break;
case SYS_pathconf:
case SYS_lpathconf:
case SYS_fpathconf:
print_number(ip, narg, c);
putchar(',');
print_integer_arg(sysdecode_pathconf_name, *ip);
ip++;
narg--;
break;
case SYS_getpriority:
case SYS_setpriority:
putchar('(');
@@ -1419,6 +1428,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags)
print_integer_arg_valid(sysdecode_atfd, *ip);
ip++;
narg--;
print_number(ip, narg, c);
break;
case SYS_cap_fcntls_limit:
print_number(ip, narg, c);
@@ -1477,6 +1487,41 @@ ktrsyscall(struct ktr_syscall *ktr, u_int sv_flags)
print_number(ip, narg, c);
print_number64(first, ip, narg, c);
break;
case SYS_fchownat:
print_number(ip, narg, c);
print_number(ip, narg, c);
print_number(ip, narg, c);
break;
case SYS_fstatat:
case SYS_utimensat:
print_number(ip, narg, c);
print_number(ip, narg, c);
break;
case SYS_unlinkat:
print_number(ip, narg, c);
break;
case SYS_sysarch:
putchar('(');
print_integer_arg(sysdecode_sysarch_number, *ip);
ip++;
narg--;
c = ',';
break;
}
switch (ktr->ktr_code) {
case SYS_chflagsat:
case SYS_fchownat:
case SYS_faccessat:
case SYS_fchmodat:
case SYS_fstatat:
case SYS_linkat:
case SYS_unlinkat:
case SYS_utimensat:
putchar(',');
print_mask_arg0(sysdecode_atflags, *ip);
ip++;
narg--;
break;
}
}
while (narg > 0) {