svn commit: r315509 - head/usr.bin/truss
John Baldwin
jhb at FreeBSD.org
Sat Mar 18 19:59:22 UTC 2017
Author: jhb
Date: Sat Mar 18 19:59:21 2017
New Revision: 315509
URL: https://svnweb.freebsd.org/changeset/base/315509
Log:
Decode arguments passed to kldsym() and kldunloadf().
This does not currently decode the kld_sym_lookup structure passed to
kldsym().
Modified:
head/usr.bin/truss/syscall.h
head/usr.bin/truss/syscalls.c
Modified: head/usr.bin/truss/syscall.h
==============================================================================
--- head/usr.bin/truss/syscall.h Sat Mar 18 19:54:58 2017 (r315508)
+++ head/usr.bin/truss/syscall.h Sat Mar 18 19:59:21 2017 (r315509)
@@ -45,7 +45,8 @@ enum Argtype { None = 1, Hex, Octal, Int
Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl,
LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long,
Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2,
- CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode,
+ CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd,
+ Kldunloadflags,
CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags,
CloudABIFDStat, CloudABIFileStat, CloudABIFileType,
Modified: head/usr.bin/truss/syscalls.c
==============================================================================
--- head/usr.bin/truss/syscalls.c Sat Mar 18 19:54:58 2017 (r315508)
+++ head/usr.bin/truss/syscalls.c Sat Mar 18 19:59:21 2017 (r315509)
@@ -193,8 +193,12 @@ static struct syscall decoded_syscalls[]
.args = { { Int, 0 } } },
{ .name = "kldstat", .ret_type = 1, .nargs = 2,
.args = { { Int, 0 }, { Ptr, 1 } } },
+ { .name = "kldsym", .ret_type = 1, .nargs = 3,
+ .args = { { Int, 0 }, { Kldsymcmd, 1 }, { Ptr, 2 } } },
{ .name = "kldunload", .ret_type = 1, .nargs = 1,
.args = { { Int, 0 } } },
+ { .name = "kldunloadf", .ret_type = 1, .nargs = 2,
+ .args = { { Int, 0 }, { Kldunloadflags, 1 } } },
{ .name = "kse_release", .ret_type = 0, .nargs = 1,
.args = { { Timespec, 0 } } },
{ .name = "lchflags", .ret_type = 1, .nargs = 2,
@@ -1893,6 +1897,13 @@ print_arg(struct syscall_args *sc, unsig
print_integer_arg(sysdecode_getfsstat_mode, fp,
args[sc->offset]);
break;
+ case Kldsymcmd:
+ print_integer_arg(sysdecode_kldsym_cmd, fp, args[sc->offset]);
+ break;
+ case Kldunloadflags:
+ print_integer_arg(sysdecode_kldunload_flags, fp,
+ args[sc->offset]);
+ break;
case CloudABIAdvice:
fputs(xlookup(cloudabi_advice, args[sc->offset]), fp);
More information about the svn-src-all
mailing list